I'm still working through Mac Lane and Birkhoff and I have another question. The question is: In a group $G$, show that $$ (g_1 g_2)^m = g_1^m g_2^m $$ for all integers $m$ if and only if $g_1 g_2 = g_2 g_1$.
It's pretty clear that if we assume that $g_1$ and $g_2$ then the above is true. However, I'm getting stuck trying show in the other direction. What I've been trying is to start with $$ (g_1 g_2)^m = g_1 g_1 g_1 \cdots g_2 g_2 g_2 $$ and then somehow cancel terms to arrive at the desired result of $g_1 g_2$ on the LHS and $g_2 g_1$ on the RHS (as this is pretty clear and works nicely when $m =2$). Is this the way to go about it, or is there another way?