This exercise is out of A First Course in Abstract Algebra, 7th Edition by John Fraleigh, and it is Exercise 13.50. Is my solution correct? If not, is there any way I can improve? The question is:
Let $\phi:G\to H$ be a group homomorphism. Show that $\phi[G]$ is abelian if and only if for all $x,y\in G$, we have $xyx^{-1}y^{-1}\in\ker(\phi).$
Proof: Suppose $\phi[G]$ is abelian, and let $e'$ be the identity element of $H$. Since $\phi$ is a homomorphism, we have for all $x,y\in G$ that
$\begin{align} \phi(xyx^{-1}y^{-1})&=\phi(x)\phi(y)\phi(x^{-1})\phi(y^{-1})\\
&=\phi(x)\phi(y)(\phi(x))^{-1}(\phi(y))^{-1}\\
&=\phi(x)\phi(y)(\phi(y))^{-1}(\phi(x))^{-1}\\
&=\phi(x)e'(\phi(x))^{-1}\\
&=\phi(x)(\phi(x))^{-1}\\
&=e',
\end{align}$
so $xyx^{-1}y^{-1}\in\ker(\phi)$. Conversely, suppose $xyx^{-1}y^{-1}\in\ker(\phi)$ for all $x,y\in G$. Then $\phi(xyx^{-1}y^{-1})=e'$ for all $x,y\in G$. Since $\phi$ is a homomorphism, we have
$\begin{align}\phi(x)\phi(y)\phi(x^{-1})\phi(y^{-1})&=e'\\
\phi(x)\phi(y)(\phi(x))^{-1}(\phi(y))^{-1}&=e'\\
\phi(x)\phi(y)=\phi(y)\phi(x).
\end{align}$
Since $\phi(x),\phi(y)\in\phi[G]$ are arbitrary, $\phi[G]$ is abelian.
Therefore, $\phi[G]$ is abelian if and only if for all $x,y\in G$, $xyx^{-1}y^{-1}\in\ker(\phi)$. $\blacksquare$
Best Answer
Less basic approach. First recall that the commutator subgroup $G'$ may not consist solely in commutators (though you need to go up to a group of order $96$ to find an exception).
Second, $G'$ is the smallest subgroup such that $G/G'$ is abelian.
Thus, for any other normal subgroup $N$, $G/N$ abelian $\iff G'\le N$.
Now for the problem: suppose every commutator $[x,y]\in \ker \phi$. Since $\ker\phi$ is a normal subgroup, and since the set of all commutators generates $G'$, we get $G'\le\ker \phi$. So by the first isomorphism theorem, $G/\ker \phi\cong\operatorname{im}\phi$ is abelian.
Conversely, suppose $\operatorname{im}\phi$ is abelian. Then by the first isomorphism theorem, $G/\ker\phi$ is abelian. So $G'\le\ker\phi$. But of course $G'$ contains $[x,y]$ for all $x,y\in G$.