Free modules are projective.
Solution 1:
There is no issue: for each $i$ you are choosing an $a_i\in A$ such that $g(a_i) = f(x_i)$. The definition of projective does not require the extension to be unique. You think of an example: consider $A = R^2, B = R$ and $g(r,s) = r + s$. Let $M = R$ and let $f:M\to B$ be the identity. Then there are many ways to extend $f$ - in fact infinitely many if $R$ is infinite.