Let $G,H$ be a two groups, $S$ a subset of $G$ and $f:G\rightarrow{H}$ a morphism. I want to prove that $f(\langle S\rangle)=\langle f(S)\rangle$.
I know that $f(\langle S\rangle)\supset\langle f(S)\rangle$ since $f(\langle S\rangle)$ is a subgroup of $H$. For the reverse inclusion, we can write every element of $g\in{G}$ as $g=s_1\dots s_n$, where $s_i\in{S\cup{S^{-1}}}$. Since $f$ is a morphism, then $f(g)=f(s_1)\dots f(s_n)\in{\langle f(S)\rangle}$.
I was wondering whether this proof is correct.
Here is where you have made a mistake:
Does $S$ generate $G$?