Hi, I'm currently trying to deduce de Moivre's formula,

.

This is what i have so far...

If , and

Then we have,

But I can't seem to figure out how they got from the second to the third step, It would be greatly appreciated if someone could please explain this.