I want to prove the following:
Let $R$ be a ring. Let $P$ and $S$ be $R$-modules, with $P$ being a projective $R$-module. Let $\phi: P \to S$ and $f: R \to S$ be surjective $R$-module homomorphisms. Then $P= \text{Ker}(\phi) + \text{Im}(g)$, where $g:R \to P$ is an $R$-module homomorphism such that $\phi \circ g =f$. (Such a $g$ exists because $R$ is a projective $R$-module. )
So by taking an element $p \in P$ cannot express it as a sum of an element of $Ker(\phi)$ and another element of $Im(g)$. I know there is probably trivial explanation but I really frustrates me not to see it. Thanks!
The statement is true, and a bunch of hypotheses can be dropped:
Given $p \in P$, since $\phi(p) \in S$ and $f$ is surjective, we know that there exists $r \in R$ such that $\phi(p) = f(r)$. Hence, $$ \phi(p-g(r)) = \phi(p) - \phi(g(r)) = \phi(p) - f(r) = 0, $$ meaning that $p-g(r) \in \ker \phi$. Thus: $$ p = [p-g(r)]+g(r) \in \ker \phi + \operatorname{im} g. $$