Suppose we have finitely generated abelian groups $G_1$ and $G_2$. Then there exists free groups $F_1$ and $F_2$ such that $F_i \stackrel{q_i}\rightarrow G_i$ maps the basis elements of $F_i$ to generators of $G_i$. Given a group homomorphism $g: G_1 \rightarrow G_2$, I want to define a map $f: F_1 \rightarrow F_2$ such that the following diagram commutes: \begin{array}{ccccc} F_1 & \stackrel{q_1}\rightarrow & G_1 & \rightarrow &0 \\ \downarrow f & & \downarrow g\\ F_2 & \stackrel{q_2}\rightarrow & G_2 & \rightarrow &0 \end{array} The obvious map is to let $f(x)$ be an/the element $y \in F_2$ such that $q_2(y) = g \circ q_1(x)$. I don't think that this is well defined in general though.
My question is then whether or not this map is ever well defined, or if we can construct a different map that is well defined? I can't think of any possible maps that may work.
Edit: I've thought about this, we need $f(x)$ to be an element of $q_2^{-1}(g\circ q_1(x))$. There may be several elements to choose from, but I don't think there's any danger in just choosing one for each basis element of $F_1$ and defining $f$ using our choices?