Good people,
Well, this was an exercise that I invented for myself in the process of trying to understand triangulated categories a little bit better, but which I so far have been unable to prove. A little help would be appreciated.
Let's say that you're in an abelian category, and you are given three short exact sequences, $$0 \xrightarrow{\quad \ \quad } A \xrightarrow{\quad f \quad } B \xrightarrow{\quad g \quad } X \xrightarrow{\quad \ \quad } 0$$ and $$0 \xrightarrow{\quad \ \quad } A \xrightarrow{\quad h \quad } C \xrightarrow{\quad k \quad } Y \xrightarrow{\quad \ \quad } 0$$ and $$0 \xrightarrow{\quad \ \quad } B \xrightarrow{\quad \ell \quad } C \xrightarrow{\quad m \quad } Z \xrightarrow{\quad \ \quad } 0$$ is it then always a given that there exist morphisms $s : X \rightarrow Y$ and $t: Y \rightarrow Z$ such that $$0 \xrightarrow{\quad \ \quad } X \xrightarrow{\quad s \quad } Y \xrightarrow{\quad t \quad } Z \xrightarrow{\quad \ \quad } 0$$ is a short exact sequence?
If so, prove it. If not, please explain why not, and/or provide a counterexample.
EDIT: I have been informed that unless you put $h = \ell \circ f$, there is a very neat counterexample (thank you @John Palmieri!). As such, please assume that $h = \ell \circ f$.
First of all, note that $(k \circ \ell) \circ f = k \circ h = 0$. Therefore, by $g$ being a cokernel of $f$, there exists a unique morphism $s : X \to Y$ such that $s \circ g = k \circ \ell$. Similarly, since $m \circ h = m \circ (\ell \circ f) = 0 \circ f = 0$, and $k$ is a cokernel of $h$, there exists a unique morphism $t : Y \to Z$ such that $t \circ k = m$.
Now to show the exactness in stages:
We need $t \circ s = 0$. But we have $(t \circ s) \circ g = t \circ (s \circ g) = t \circ (k \circ \ell) = m \circ \ell = 0$; and since $g$ is an epimorphism, the result follows.
We need that $t$ is an epimorphism. Well, $t \circ k = m$ is an epimorphism, so $t$ must also be an epimorphism.
We need that $s$ is a monomorphism. To see this, suppose we have an object $U$ and a morphism $x : U \to X$ such that $s \circ x = 0$. Then since $g$ is an epimorphism, there exists an epimorphism $\pi : V \to U$ and a morphism $b : V \to B$ such that $x \circ \pi = g \circ b$ (for example, setting $V$ to be the fibered product of $x$ and $g$ will work). Now, $0 = (s \circ x) \circ \pi = s \circ g \circ b = k \circ \ell \circ b$. By the exactness of the second diagram, it follows that $\ell\circ b$ factors through $h$. The factor $a : V \to A$ then satisfies $\ell\circ (f \circ a) = \ell\circ b$, and since $\ell$ is a monomorphism, we see that $b = f \circ a$. But then, $x \circ \pi = g\circ b = g\circ f \circ a = 0$; and since $\pi$ is an epimorphism, that implies $x = 0$. Thus, we have shown that $\ker(s) = 0$, which in an abelian category is sufficient to conclude that $s$ is a monomorphism.
Now, to conclude exactness, it suffices to show that $s$ is a kernel of $t$. For that, since we already showed that $t\circ s = 0$ and that $s$ is a monomorphism, it suffices to show that whenever $y : U \to Y$ is such that $t \circ y = 0$, then $y$ factors through $s$. With these hypotheses, again there exists an epimorphism $\pi : V \to U$ and $c : V \to C$ such that $y \circ \pi = k \circ c$. Now $m\circ c = t \circ k \circ c = t \circ y \circ \pi = 0 \circ \pi = 0$; so by the exactness of the third sequence, we see that $c$ factors through $\ell$. If $b : V \to B$ is the factor, then $y\circ \pi = k\circ c = k\circ \ell\circ b = s\circ g\circ b$, so that $y\circ \pi$ factors through $s$. From here, the following lemma will conclude the proof:
Lemma: Suppose $\pi : V\to U$ is an epimorphism, $i : A \to B$ is a monomorphism, and $b : U \to B$ is such that $b\circ \pi$ factors through $i$. Then $b$ also factors through $i$.
Proof (outline): Consider the fibered product $U'$ of $i$ and $b$. Then we have a morphism $V \to U'$ determined by the given $\pi : V\to U$ and the factor map $V\to A$ of $b\circ \pi$. Moreover, the map $U' \to U$ is a monomorphism since monomorphisms are stable under fibered products; and the map $U'\to U$ is also an epimorphism as a factor of the given epimorphism $\pi : V\to U$. Therefore, the map $U' \to U$ is in fact an isomorphism; and composing the inverse of this map with the map $U' \to A$ gives the desired factor map.
Now as a brief explanation of the "generalized element method" that I mentioned in a comment: this proof is very much patterned after the natural diagram chasing argument that you would use in the case of abelian groups. However, in case of elements of a group, I use morphisms from some "test object" $U$ to the given object of the abelian category. As you saw in this proof, when the diagram chasing argument takes the preimage of an element under an epimorphism, we may need to adjust the test object; but using the stability of epimorphisms under fibered products (which you first need to establish using another method), you can limit the adjustments of test object to "epimorphic coverings".
(This method is closely related to the philosophy of using Yoneda's lemma to construct certain morphisms, and/or to prove properties of those morphisms.)
(I also like to use names such as $U$ and $V$ for test objects because it reminds me of the case where the abelian category is the category of sheaves of abelian groups on some topological space, or on some site. In fact, this is related since if the test object is $h_U$, the morphisms from $h_U$ to a sheaf $\mathscr{F}$ are canonically identified with the elements of $\mathscr{F}(U)$. And in the "lifting by an epimorphism", we can see in this special case: if $\mathscr{F}\to \mathscr{G}$ is an epimorphism and $g \in \mathscr{G}(U)$, then there exists an open cover $\{ V_i \mid i \in I \}$ of $U$ and sections $f_i \in \mathscr{F}(V_i)$ with $f_i \mapsto g |_{V_i}$. Then $\amalg_{i\in I} h_{V_i} \to h_U$ is an epimorphic cover.)