Let $\phi: G \to F(X)$ be a group homomorphism suppose that $\phi$ maps a subset $S$ of $G$ bijectively onto $X$. Then $F(X) $ is isomorphic to $\langle S\rangle$, where $F(X)$ free group with basis $X$.
Idea of the proof : $\phi:S\to X$ is a bijection . $\phi^{-1}:X\to S\subset G$ is injective . Then by definition of free group there exist an unique group homomorphism $\bar{\phi}^{-1}: F(X)\to G$ which is also injective. I am unable to understand why the induced homomorphism is also injective?
The idea with that proof seems to be noting that $\phi \circ \bar{\phi}^{-1}$ is the identity $F(X) \to F(X)$. This is just because each element of $X$ maps to itself and the unique group homomorphism that does that is the identity.