Let $\phi:G\to H$ be a group homomorphism. Show that $\phi[G]$ is abelian iff $\forall x,y\in G,xyx^{-1}y^{-1}\in\ker(\phi)$. 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$
 A: 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$.
A: For a group $G$, the commutator subgroup, written $K(G)$ or $[G,G]$, is defined as the smallest normal subgroup generated by all commutators $[x,y]=x^{-1}y^{-1}xy$, written:
$$K(G)=[G,G]
=\langle[x,y]|x,y\in G\rangle.$$
The set of all commutators usually is not a subgroup. We have the theorem, that for a normal subgroup $N<G$, the factor group $G/N$ is abelian iff $N$ contains $K(G)$.
Concerning your question: If all commutators are in $\ker(\phi)$, which is a normal subgroup, then $K(G)<\ker(\phi)$, therefore the factor group $G/\ker(\phi)$ is abelian due to the upper lemma and due to the fundamental theorem on homomorphisms is is isomorphic to $\operatorname{img}(\phi)=\phi(H)$, which is therefore also abelian.
