So multiply through:
Collect like terms:
(see below for explanation of this stage)
Again, multiply through:
Again, collect like terms:
You'll have to check my working for silly errors, but the key thing to apply when you've reached the stage you have is just and rearrange that to convert everything into one trig. function - I used it at the indicated stage to convert the cosine function into a sine function.