commutative diagram Let
$$\begin{array}
AA & \stackrel{f}{\longrightarrow} & B \\
\downarrow{h} & & \downarrow{h'} \\
C & \stackrel{g}{\longrightarrow} & D  
\end{array}
$$
be a commutative diagram of $\mathcal{O}$-modules ($\mathcal{O}$ principal domain) with $f$ and $g$ surjective and $coker(h) \simeq coker(h')$.  Assume we are given $b \in B$, $d \in D$ and $c \in C$ such that $h'(b) = d$ and $g(c) = d$. Also suppose that $c = h(a')$ for some $a' \in A$. Does there exist $a \in A$ such that $f(a)=b$ and $h(a)=c$ ?
[Edit] changed $coker(h) = coker(h')$ into $coker(h) \simeq coker(h')$ as suggested by Tim Duff question.

This is true if and only if $f : \mathrm{ker}(h) \to \mathrm{ker}(h')$ is surjective.
"$\Rightarrow$" Take $b=c=d=0$.
"$\Leftarrow$" Compute $h'(f(a'))=g(h(a'))=g(c)=d=h'(b)$, so $e = b-f(a')$ lies in the kernel of $h'$. Choose $u \in \mathrm{ker}(h)$ with $f(u)=e$. Then $a=a'+u$ satisfies $f(a)=b$ and $h(a)=c$. QED
Now, if $\tilde{h} : \mathrm{ker}(f) \to \mathrm{ker}(g)$ is the homomorphism induced by $h$, then the Snake Lemma yields an exact sequence
$0 \to \mathrm{ker}(\tilde{h}) \to \mathrm{ker}(h) \to \mathrm{ker}(h') \to \mathrm{coker}(\tilde{h}) \to \mathrm{coker}(h) \to \mathrm{coker}(h') \to 0$.
Thus, $\mathrm{ker}(h) \to \mathrm{ker}(h')$ is surjective iff the map $\mathrm{coker}(\tilde{h}) \to \mathrm{coker}(h)$ is injective, and $\mathrm{coker}(h) \to \mathrm{coker}(h')$ is an isomorphism iff the map $\mathrm{coker}(\tilde{h}) \to \mathrm{coker}(h)$ is trivial. So both conditions are satisfied iff $\tilde{h}$ is surjective, but none of them implies the other one.
Instead of $\mathsf{Mod}(\mathcal{O})$ we can work in any abelian category.
