Let $A$ and $B$ be non-empty sets with associated free groups $F(A),F(B)$. Given an injective function $f: A \to B$, is the induced homomorphism $\bar{f}: F(A)\to F(B)$ injective?
Let $i_A: A \to F(A)$ and $i_B: B \to F(B)$ be the usual inclusions. Taking $i_A$ and $i_B \circ f$ we get an induced homomorphism $\bar{f}: F(A) \to F(B)$, but it cannot be concluded that $\bar{f}$ is injective using only the universal property of free objects.
Given two distinct words $w,w' \in F(A)$, the claim should follow by contradiction if we can conclude that $\bar{f}(w)=\bar{f}(w')$ implies $\bar{f}(a_1) = \bar{f}(a_2)$ for some distinct $a_1,a_2 \in i_A(A)$. Is this conclusion possible? For context I am looking at the construction of the free product given here.
On a side note, the construction of the injections in the linked document seems slightly ambigious.
Yes, $\bar f$ is injective. To prove it, use the universal property of $F(B)$ to define a homomorphism $h:F(B)\to F(A)$ by defining it on the generators in $B$ as follows. For generators $b$ in the range of $f$, say $b=f(a)$, set $h(b)=a$. (That's unambiguous because $f:A\to B$ is one-to-one.) For generators $b$ not in the range of $f$, set $h(b)=e$, the identity element of $F(A)$. Notice that $h\circ\bar f$ is a homomorphism from $F(A)$ into itself, sending each generator $a\in A$ to itself. But the identity map $1$ of $F(A)$ is also such a homomorphism. By the uniqueness clause in the universal property of $F(A)$, it follows that $h\circ\bar f=1$, and that implies in particular that $\bar f$ is one-to-one.