First of all, to show that two free groups are isomorphic, it's not enough to construct injective homomorphisms in both directions. You have to show that there is a homomorphism with an inverse, i.e. a bijective homomorphism.
For example, the free group on three generators $\langle a,b,c\rangle$ maps into the free group on two generators $\langle x,y\rangle$ by $a\mapsto x^2,b\mapsto y^2,c\mapsto xy$.
But the hard part here is showing that two isomorphic free groups must have independent generating sets of the same cardinality. I don't think this is trivial, even for finite generating sets, but here is a proof that works for sets of any cardinality:
Suppose that $F$ and $G$ are free groups on the sets $S$ and $T$ respectively.
If $F$ is isomorphic to $G$, then their abelianizations $F^{ab}$ and $G^{ab}$, are isomorphic. These are free abelian groups on the sets $S$ and $T$.
Taking tensor products, we have $F^{ab} \otimes_\mathbb{Z} \mathbb{Q} \cong G^{ab} \otimes_\mathbb{Z} \mathbb{Q}$. These are vector spaces over $\mathbb{Q}$ with bases indexed by $S$ and $T$. Since every basis of a vector space has the same cardinality, $|S| = |T|$.