Free modules are projective.
Let $M$ be a free module. We have the diagram below (where the second row is exact)
Since $M$ is free, it has a basis (call it $X$). For every $x_i \in X$, there exists $b_i \in B$ such that $f(x_i)=b_i$. But since $g$ is surjective, there exists $a_i \in A$ such that $g(a_i)=b_i$. So I was planning to define the funtion $\bar{f} : M \rightarrow A$ by $\bar{f}(x_i) = a_i$ such that $f(x_i)=b_i$ and $g(a_i)=b_i$. But then I remembered that $g$ was not necessarily injective...so one element in $M$ can be sent to more than one element in $A$, right? And that would mean that $\bar{f}$ is not well-defined. So I was just wondering if there was a way to resolve this issue...
Thanks in advance.