Use De Moivre's theorem to express and in terms of and .
If is a complex number, then
De Moivre's Theorem states that, if is a positive integer, then
Equate the real parts.
Now use the identity .
Equate the imaginary parts.