It's not that bad. Here's one way to do it. You need to know three things:

Euler's Formula:

Product-to-sum formulas for sine and cosine:

and finally,

Now, let's get to it:

...........................applied Euler's formula

....................................rearranged the terms

.........applied the sum-to-product formulas

...............................factored out the common

as desired