Show that a group $G$ is abelian if $(gh)^3 = g^3h^3$, $(gh)^4 = g^4h^4$, and $(gh)^5 = g^5h^5$ for all $g$ and $h$ in $G$.
I have tried many manipulations but I keep getting stuck as I am not even able to see why it is true. Every other exercise I tried seemed routine or manageable, but this one in particular I need a hint.
$(gh)^4=gh(gh)^3=ghg^3h^3=g^4h^4$ implies that $hg^3=g^3h$
$(gh)^5=(gh)(gh)^4=ghg^4h^4=g^5h^5$ implies that $hg^4=g^4h$
We deduce that $(hg^3)g=g^3hg=g^4h$ which implies that $hg=gh$