An exercise from Leinster:
I believe I solved one part (is my solution correct?) and made some progress on the other part -- see my question at the end.
$\require{AMScd}$ \begin{CD} A @>f>> B@>g>> C\\ @VrVV @VsVV @VVtV\\ D @>>h> E @>>k> F \end{CD}
Let's call the upper row $A\to B\to C$ with maps $f:A\to B, g:B\to C$ and the bottom row $D\to E\to F$ with maps $h:D\to E$ and $k:E\to F$. Let's call the vertical arrows (from left to right) $r,s,t$.
Suppose the two subsquares are pullbacks. Let $X$ be an object and $H_x:X\to C$ and $G_x: X\to D$ arrows such that $t\circ H_x=(k\circ h)\circ G_x$. We need to show that there exists a unique $x:X\to A$ such that (1) $r\circ x=G_x$ and (2) $(g\circ f)\circ x=H_x$. Since $k\circ (h\circ G_x)=t\circ H_x$ and since the right square is a pullback, there is a unique $b:X\to B$ s.t. $g\circ b=H_x$ and $s\circ b=h\circ G_x$. Since the left square is a pullback and since $s\circ b=h\circ G_x$, there is a unique arrow $a:X\to A$ s.t. $f\circ a=b$ and $r\circ a= G_x$. Define $x=a$. Then (1) holds. Also, (2) holds because $H_x=g\circ b=g\circ (f\circ a)=(g\circ f)\circ a$. Thus the big rectangle is a pullback.
Conversely, suppose the big rectangle and the right square are pullbacks. Let $A'$ be an object and $H_a:A'\to B,\ G_a:A'\to D$ be arrows such that $s\circ H_a=h\circ G_a$. We need to show that there exists an arrow $x:A'\to A$ such that (1) $f\circ x=H_a$ and (2) $r\circ x= G_a$. The equality $s\circ H_a=h\circ G_a$ implies $k\circ s\circ H_a=k\circ h\circ G_a$ and since the right square commutes, this is the same as $t\circ (g\circ H_a)=(k\circ h)\circ G_a$. In view of this and the fact that the big rectangle is a pullback, there exists a unique arrow $x:A'\to A$ such that $(g\circ f)\circ x=g\circ H_a$ and $r\circ x= G_a$. The latter is exactly (2), which we need. But the former is not quite (1). If $g$ were monic, the former would imply (1) and we would be done. But it need not be monic. How to proceed then?
As a bonus question, is it false that if the big rectangle is a pullback and the left square is a pullback, then the right square is a pullback?
Update: from the link to the full proof in the comments, here is an attempt to conclude the proof of the second part in my notation. Note that both arrows $H_a$ and $f\circ x$ are arrows $A'\to B$. Moreover, we know that $g\circ (f\circ x)=g\circ H_a$, hence $t\circ g\circ (f\circ x)=t\circ g\circ H_a$. We also previously remarked that $t\circ( g\circ H_a)=k\circ (g\circ G_a)$. This last equality together with the fact that the right square is a pullback says that there is a unique arrow $l:A'\to B$ for which $g\circ l=g\circ H_a$ (recall that the RHS is also equal to $g\circ f\circ x$) and $s\circ l=h\circ G_a$. To conclude the proof, it remains to show that these two equalities hold for $l=f\circ x$ and $l=H_a$. I can see why $g\circ l=g\circ H_a$ holds for both $l=f\circ x$ and $l=H_a$ and I can see why $s\circ l=h\circ G_a$ holds for $l=H_a$. But why does $s\circ l=h\circ G_a$ hold for $l=f\circ x$?
