Let $f$ be an automorphism and $G'$ the commutator subgroup. If $U$ is the set of commutators, I've shown $f(U)=U$.
So, $f(U)$ contains all the commutators and so $f(U) \subset G'$.
We also know since $U \subset G'$, then $f(U) \subset f(G')$. Since $f(G')$ contains all commutators, then since $G'$ is the smallest subgroup containing all the commutators, then $G' \subset f(G')$.
How can I show $f(G') \subset G'$?
Since $f$ is an automorphism of $G$, $f^{-1}$ is also an automorphism of $G$. Then $G'\subset f^{-1}(G')$. So, $f(G')\subset f(f^{-1}(G'))=G'$.