Let $A=\{a,b\}$ and $a\ne b$. Let $F(A)$ be the free group constructed on $A$. Let $f_a,f_b$ be the canonical homomorphisms of $\mathbb{Z}$ into $F(A)$. Let $g:F(A)\rightarrow\mathbb{Z}\times\mathbb{Z}$ be the unique homomorphism for which $g(f_a(1))=(1,0)$ and $g(f_b(1))=(0,1)$. Let $h:\mathbb{Z}\times\mathbb{Z}\rightarrow F(A)$ be the mapping defined by $h(n,m)=f_a(n)f_b(m)$. Then $h\circ g=id_{F(A)}$ and $g\circ h=id_{\mathbb{Z}\times\mathbb{Z}}$. This means that $g$ is an isomorphism. Since $\mathbb{Z}\times\mathbb{Z}$ is abelian, $F(A)$ is also abelian.
This is surely wrong, right? Where is the mistake?
The map $h$ is not a homomorphism. Indeed, if you try and prove it is a homomorphism, you will find that you need to know that $f_a(1)$ and $f_b(1)$ commute in $F(A)$, which you do not know to be true (and it is in fact false).