rewrite (a*b)^n= a*b*a*b*a*b*a*b*.....*a*b with n pairs. Since G is abelian we can commute the elements. bring all the a's to the left and the b's to the right and get

a*a*a*a*...*a*b*b*b*....*b, n times each. This equals a^n * b^n.

Note that it is very important that G is abelian. If not, we cannot rearrange the terms however we like!