let M,N R-modules, and L a free R-module.
consider the morphism g:L⟶N,f:M⟶N, f epimorphism. Show that exist h:L⟶M such that f∘h=g
I try to define h in some basis, with that i can use a theorem that extend this morphism in L, but since f isn't injective(or at last we don't know that) i can't define in this way:
Let X a basis of L, take x in X, g(x)=f(y) for some y in M, i would like to define h(x)=y but i think that isn't well defined.
Your idea is correct.
Define $h$ for all elements in a basis $X$ of $L$, and then extend it $R$-linearly to all of $L$ using this basis. This means that, if $l\in L$, then $l$ is a finite sum $l= \sum_{i} r_ix_i$ where $r_i\in R$, $x_i\in X$, so $h(l) = \sum_{i} r_ih(x_i).$ This $h$ is $R$-linear and satisfies $fh=g$.
You should carefully make sure you understand all the details of the result you are using, the fact that $f$ is not injective doesn't affect anything. It works for any $R$-linear map $f$.