During my physics 1 course I stumbled upon this problem (our professor left it as an exercise). Basically I have to prove that $$A\cos(\omega t) + B\sin(\omega t) = C\cos(\omega t + \varphi )$$ and find $C$,$\varphi$ in function of $A$,$B$. He told us as a hint that we can use the trigonometric identity $$\cos(\alpha + \beta) = \cos\alpha \cos\beta - \sin\alpha \sin\beta$$ I really don't understand how to approach this problem. The most promising way I found is to apply the identity to the r.h.s., that is to say: $$C\cos(\omega t + \varphi ) = C(cos\omega t cos\varphi - sin\omega t sin\varphi)$$
Expliciting $C$: $$C = \frac{Asin\omega t + Bcos\omega t}{cos\omega t cos\varphi - sin\omega t sin\varphi}$$ But now I'm stuck: how can I express $C$ in terms of only $A$ and $B$?
Hint.
We have
$$ \cos(\omega t)\frac AC + \sin(\omega t)\frac BC = \cos(\omega t)\cos\varphi-\sin(\omega t)\sin\varphi $$