The probability of getting that out without having seen it before under exam conditions is very low...
You just have to expose yourself to these sort of questions and learn the methods and then apply it, this is commonly asked under applications of De Moivre's theorem and is explained well in Cambridge, Patel and Excel.
Timothy Siu's method is the best one probably to use.