Let $A$ be a ring, $M,N$ $A$-modules, and consider the following diagram of $A$-modules, where the two horizontal sequences are exact and $f:M\to N$ is $A$-linear:
$$\require{AMScd} \begin{CD} A^{(I_1)} @>>> M @>>> 0 \\ @. @VVfV\\ A^{(J_1)} @>>> N @>>> 0 \end{CD} $$
Let $\epsilon:A^{(I_1)} \to M$ and $\epsilon':A^{(J_1)} \to N$ be the epimorphisms that appear on the diagram, defined by $\epsilon (e_i)=x_i$ where $\{x_i\}_{i \in \hat{I}_1}$ is a system of generators of $M$ and analogously with $N$ and $\epsilon'$.
The question is to show that there exist $f_0:A^{(I_1)} \to A^{(J_1)}$ such that the diagram commutes.
Take $e_i \in A^{(I_1)}$, then $f\circ \epsilon (e_i) = f(x_i) \in N$. Since $\epsilon'$ is an epimorphism, there exist $y \in A^{(J_1)}$ such that $\epsilon'(y)=f(x_i)$. So my idea is to define $f_0$ such that $f_0(e_i)=y$. Now the problem is that there could be several $y \in A^{(J_1)}$ such that $\epsilon'(y)=f(x_i)$.
Question: Is $f_0$ well defined? I'm not being able to understand if it is, or if the dependance of the $y \in A^{(J_1)}$ may affect the good definition.
The notation is quite confusing, so first let's try and simplify it.
You have
There are unique homomorphisms $\varepsilon\colon A^{(I)}\to M$ and $\varepsilon'\colon A^{(J)}\to N$ such that $$ \varepsilon(e_i)=x_i,\quad i\in I \qquad\text{and}\qquad \varepsilon(e'_j)=y_j,\quad j\in J $$ You want to define $f_0\colon A^{(I)}\to A^{(J)}$ such that $$ f\circ\varepsilon=\varepsilon'\circ f_0 $$
In order to define $f_0$ you just have to assign what $f_0(e_i)$ should be, since the domain of $f_0$ is free with basis $\{e_i:i\in I\}$. Now the requirement reads $$ \varepsilon'\circ f_0(e_i)=f\circ \varepsilon(e_i)=f(x_i) $$ For every $i\in I$, choose $z_i\in A^{(J)}$ such that $\varepsilon'(z_i)=f(x_i)$. Then assign $f_0(e_i)=z_i$ and you're done.
Note that this works also if instead of $A^{(J)}\to N$ surjective you take any $K\to N$ surjective.
Even more generally, this works for every diagram with exact rows of the form $$ \begin{CD} P @>\alpha>> M @>>> 0 \\ @. @VVfV \\ K @>\beta>> N @>>> 0 \end{CD} $$ where $P$ is projective. Just use the definition and the diagram $$ \begin{CD} {} @. P \\ @. @VV{f\circ\alpha}V \\ K @>\beta>> N @>>> 0 \end{CD} $$