The exercise in the book is:
If we have $k$ in the group $(G, \star)$ for three consecutive integers $$\forall a,b \in G \quad (a \star b)^k = a^k \star b^ k$$ Prove that $(G, \star)$ is commutative.
In the book I could only find the prove for $(a \star b)^{-1} = b^{-1} \star a^{-1}$.
I'm trying to solve this exercise and here's what I've done so far:
$( \Rightarrow)$ If $(G,\star)$ is commutative then $\forall a,b \in G$ we have $$a \star b = b \star a$$ So $(a\star b)^k = (b \star a)^k = a^k \star b^k$. Because:
$\underbrace{(a \star b)\star (a \star b) \star ... \star (a\star b)}_k = a^k \star b^k$.
$(\Leftarrow)$ Now if $(a \star b)^k = a^k \star b^k$ then if $a=b$ we have $$(a \star a)^k= a^k \star a^k$$ This implies that $a^k = (\underbrace{a \star ... \star a}_k)= a^k$ Then $\forall a,b \in G$ we have $$(a \star b)^k = a^k \star b^k = (\underbrace{a \star ... \star a}_k) \star (\underbrace{b \star ... \star b}_k)$$ we can show that $b^k \star a^k$. So it's commutative.
I'll be happy if you tell me I'm in the true way or not.