The question states... Let $\phi: G \to G$ be a homomorphism with the map $\phi(g)=g^2$. Prove $\phi$ is abelian.
So far I have:
Let $g$ and $h$ be in $G$. Then $\phi(g)=g^2$ and $\phi(h)=h^2$. Since we know it is a homomorphism,
$\phi(gh)=\phi(g)*\phi(h)=g^2*h^2....$
But I don't know how to make a connection that they're abelian. I want to show $\phi(gh)=\phi(hg)$ eventually right?
$\phi(gh)=(gh)^2=gh.gh$. By what you said, it is also equal to $g^2.h^2$. So you get $gh.gh=g^2.h^2$. Premultiply both sides by $g^{-1}$ and post multiply both sides by $h^{-1}$.