Let $N, M, M', M''$ be $R$-modules. Given homomorphisms
$f: M' \rightarrow M$
$g: M \rightarrow M''$
$\psi: N \rightarrow M$
with $\operatorname{im} f = \ker g$, $g \circ \psi = 0$ and $g$ surjective, $f$ injective I would like to show that there exists a homomorphism $\phi: N \rightarrow M'$ such that $f \circ \phi = \psi$. Trying to consider some factor modules did not lead me too far.
context: I want to show that if $0 \rightarrow M' \rightarrow M \rightarrow M'' \rightarrow 0$ is a short exact sequence, then the following sequence is exact: $0 \rightarrow Hom(N, M') \rightarrow Hom(N,M) \rightarrow Hom(N,M'')$.