I am showing that if for some group $G$, $xy=yx$ for every $x, y \in G$ then
$$(xy)^n=x^ny^n.$$
I claim this holds by induction on $n$. So base case if $n=1$, we have
$$(xy)^1=xy=x^1y^1$$
as needed. Then suppose for $k$ that we have
$$(xy)^k=x^ky^k$$
And we want to show
$$(xy)^{k+1}=x^{k+1}y^{k+1}$$
But we can expand
\begin{align} (xy)^{k+1} &= (xy)^k(xy) && \text{def of exponent} \\ &=x^ky^kxy && \text{by inductive hypotheses} \\ &=x^kxy^ky && \text{as $xy=yx$ thus $x$ commutes with all $k$ $y$'s}\\ &=x^{k+1}y^{k+1} && \text{def of exponent} \end{align}
and we are done by induction. The only step I am shaky about is the third equality. Do I separately need to show if $xy=yx$ then $y^kx=xy^k$ as well or?