Let $R$ be a unital ring. Suppose that a finitely generated free $R$-module is the internal direct sum of submodules $P$ and $Q$. Let $g:A \rightarrow B$ be a surjective $R$-module homomorphism. Let $h: P \rightarrow B$ be an $R$-module homomorphism.
Show that there is an $R$-module homomorphism $\bar{h}: P \rightarrow A$ such that $g \circ \bar{h} = h$.
Here's my approach:
We can let $A$ be the internal direct sum of the given submodules $P$ and $Q$; then by definition $A \cong P \oplus Q$, and any element of $a \in A$ can be written as $a = p + q$ for $p \in P, q \in Q$.
Then since $g$ is surjective, any $b \in B$ is the image of some $a \in A$, so any $b \in B$ is $b = g(p+q) = g(p) + g(q)$ for $p\in P, q \in Q$.
So let $\bar{h}: P \rightarrow A; p \mapsto (p+q)$ for some $q \in Q$. Then $g \circ \bar{h}: P \rightarrow B; p \mapsto g(p+q)$ = $h$, because $h: P \rightarrow B; p \mapsto g(p+q)$.
Am I on the right track? Also, what more do I need to show?
As already stated in the comments, you are not on the right track.
You are given:
You need to show:
So here’s a hint: Start showing this with the special case $Q = 0$ (meaning $P$ is free) and then work your way up. Free modules have bases and you will need the axiom of choice if you look closely.
Oh, and draw a triangle diagram with $P$ on the top and $A \overset{g}{→} B → 0$ on the bottom. If you are still stuck or when you are finished, look up projective modules.