Consider the following (typical) notion of a free group with a basis:
Notion (U)
Fix a group $F$ and a subset $B\subset F$. We say $F$ is a free group with basis $B$ if for any function $f:B\to H$, where $H$ a group, there exists a unique group homomorphism $\tilde f:F\to H$ that extends $f$.
Note above did not require $B$ to generate $F$. It is claimed that $B$ generating $F$ is equivalent to the uniqueness of above homomorphism. Namely, the following notion (G), should be equivalent to (U):
Notion (G)
Fix a group $F$ and a subset $B\subset F$. We say $F$ is a free group with basis $B$ if $B$ generates $F$, and for any function $f:B\to H$, where $H$ is a group, there exists a group homomorphism $\tilde f:F\to H$ that extends $f$.
Now, it is straightforward to show (G) $\implies$ (U), but I am unable to establish (U) $\implies$ (G). This equivalence is remarked in Lyndon and Schupp's text Combinatorial Group Theory, shortly defining free group with a basis.
I looked at several "obvious thing" to try, but perhaps I'm too silly and not seeing how to finish it. For instance, suppose group $F$ and subset $B\subset F$ satisfy (U), then the inclusion function $B\hookrightarrow F$ extends uniquelty to the identity function $1_F$, and somehow we need to show if there exists $z\in F-\langle B\rangle$, there exist a different homomorphism $F\to F$ extending the inclusion.
Or, show the inclusion function $B\hookrightarrow \langle B\rangle$ extends to an injective homomorphism $F\to B$.
Apologies if this is simply trivial and I'm not seeing it.