[proofplan]
We prove commutativity square by square in the long exact sequence. The squares involving $i$ and $p$ follow directly from the commutative chain-level diagrams and the definition of induced maps on homology. The only non-formal point is the square involving the connecting homomorphism, which we verify by choosing a lift in $B_n$, applying the chain map $f_B$, and using exactness to identify the resulting boundary in $A'_{n-1}$.
[/proofplan]
[step:Fix the notation for cycles, boundaries, and connecting homomorphisms]
For a chain complex $X_*$ with differential $d_{X,n}: X_n \to X_{n-1}$, define
\begin{align*}
Z_n(X_*) &:= \ker(d_{X,n}), &
B_n(X_*) &:= \operatorname{im}(d_{X,n+1}), &
H_n(X_*) &:= Z_n(X_*) / B_n(X_*).
\end{align*}
For a cycle $x \in Z_n(X_*)$, write $[x] \in H_n(X_*)$ for its homology class.
The connecting homomorphism
\begin{align*}
\partial_n: H_n(C_*) \to H_{n-1}(A_*)
\end{align*}
is defined as follows. Given $[c] \in H_n(C_*)$ with $c \in Z_n(C_*)$, choose $b \in B_n$ such that $p_n(b) = c$. Since $c$ is a cycle and $p$ is a chain map,
\begin{align*}
p_{n-1}(d_{B,n}(b)) = d_{C,n}(p_n(b)) = d_{C,n}(c) = 0.
\end{align*}
Exactness of
\begin{align*}
0 \to A_{n-1} \xrightarrow{i_{n-1}} B_{n-1} \xrightarrow{p_{n-1}} C_{n-1} \to 0
\end{align*}
gives a unique element $a \in A_{n-1}$ such that
\begin{align*}
i_{n-1}(a) = d_{B,n}(b).
\end{align*}
We first verify that $a$ is a cycle. Since $i: A_* \to B_*$ is a chain map,
\begin{align*}
i_{n-2}(d_{A,n-1}(a))
&= d_{B,n-1}(i_{n-1}(a)) \\
&= d_{B,n-1}(d_{B,n}(b)) \\
&= 0.
\end{align*}
Exactness at $A_{n-2}$ gives injectivity of $i_{n-2}$, hence $d_{A,n-1}(a)=0$ and $a \in Z_{n-1}(A_*)$. Therefore $[a] \in H_{n-1}(A_*)$ is meaningful, and we set
\begin{align*}
\partial_n([c]) := [a].
\end{align*}
This assignment is independent of the lift and of the representative. If $b_1,b_2 \in B_n$ are two lifts of the same cycle $c$, then $p_n(b_1-b_2)=0$, so exactness at $B_n$ gives $u \in A_n$ with $i_n(u)=b_1-b_2$. If $a_1,a_2 \in A_{n-1}$ are the corresponding elements, then
\begin{align*}
i_{n-1}(a_1-a_2)
&= d_{B,n}(b_1-b_2) \\
&= d_{B,n}(i_n(u)) \\
&= i_{n-1}(d_{A,n}(u)).
\end{align*}
Injectivity of $i_{n-1}$ gives $a_1-a_2=d_{A,n}(u)$, so $[a_1]=[a_2]$ in $H_{n-1}(A_*)$. If $c$ is replaced by the homologous cycle $c+d_{C,n+1}(v)$ with $v \in C_{n+1}$, choose $w \in B_{n+1}$ with $p_{n+1}(w)=v$ by surjectivity of $p_{n+1}$. Then $b+d_{B,n+1}(w)$ is a lift of $c+d_{C,n+1}(v)$, and its boundary is still $d_{B,n}(b)$ because $d_{B,n}d_{B,n+1}=0$. Thus the same class $[a]$ is obtained. Hence $\partial_n: H_n(C_*) \to H_{n-1}(A_*)$ is a well-defined homomorphism.
The primed connecting homomorphism $\partial'_n: H_n(C'_*) \to H_{n-1}(A'_*)$ is defined in the same way using $i'$, $p'$, and the differential of $B'_*$; the same argument proves that it is well-defined.
[/step]
[step:Show that the squares involving the inclusion maps commute]
Let $n \in \mathbb{Z}$ and let $[a] \in H_n(A_*)$ be represented by a cycle $a \in Z_n(A_*)$. The chain-level commutativity condition is
\begin{align*}
f_{B,n} \circ i_n = i'_n \circ f_{A,n}.
\end{align*}
Therefore
\begin{align*}
\bigl(H_n(f_B) \circ H_n(i)\bigr)([a])
&= H_n(f_B)([i_n(a)]) \\
&= [f_{B,n}(i_n(a))] \\
&= [i'_n(f_{A,n}(a))] \\
&= H_n(i')([f_{A,n}(a)]) \\
&= \bigl(H_n(i') \circ H_n(f_A)\bigr)([a]).
\end{align*}
Since every element of $H_n(A_*)$ is represented by such a cycle $a$, the square involving $H_n(i)$ and $H_n(i')$ commutes.
[/step]
[step:Show that the squares involving the projection maps commute]
Let $n \in \mathbb{Z}$ and let $[b] \in H_n(B_*)$ be represented by a cycle $b \in Z_n(B_*)$. The chain-level commutativity condition is
\begin{align*}
f_{C,n} \circ p_n = p'_n \circ f_{B,n}.
\end{align*}
Hence
\begin{align*}
\bigl(H_n(f_C) \circ H_n(p)\bigr)([b])
&= H_n(f_C)([p_n(b)]) \\
&= [f_{C,n}(p_n(b))] \\
&= [p'_n(f_{B,n}(b))] \\
&= H_n(p')([f_{B,n}(b)]) \\
&= \bigl(H_n(p') \circ H_n(f_B)\bigr)([b]).
\end{align*}
Thus the square involving $H_n(p)$ and $H_n(p')$ commutes.
[/step]
[step:Compare the two ways around the connecting square]
Let $n \in \mathbb{Z}$ and let $[c] \in H_n(C_*)$ be represented by a cycle $c \in Z_n(C_*)$. Choose $b \in B_n$ such that
\begin{align*}
p_n(b) = c.
\end{align*}
By the definition of $\partial_n$, there is a unique element $a \in A_{n-1}$ satisfying
\begin{align*}
i_{n-1}(a) = d_{B,n}(b),
\end{align*}
and
\begin{align*}
\partial_n([c]) = [a].
\end{align*}
Now consider the image cycle $f_{C,n}(c) \in Z_n(C'_*)$. Since the square with $p_n$ commutes,
\begin{align*}
p'_n(f_{B,n}(b)) = f_{C,n}(p_n(b)) = f_{C,n}(c).
\end{align*}
Thus $f_{B,n}(b) \in B'_n$ is a valid lift of $f_{C,n}(c)$ for the definition of $\partial'_n$.
Because $f_B$ is a chain map,
\begin{align*}
d_{B',n}(f_{B,n}(b)) = f_{B,n-1}(d_{B,n}(b)).
\end{align*}
Using $d_{B,n}(b) = i_{n-1}(a)$ and the commutative square with $i_{n-1}$, we get
\begin{align*}
d_{B',n}(f_{B,n}(b))
&= f_{B,n-1}(i_{n-1}(a)) \\
&= i'_{n-1}(f_{A,n-1}(a)).
\end{align*}
Therefore the definition of the primed connecting homomorphism gives
\begin{align*}
\partial'_n([f_{C,n}(c)]) = [f_{A,n-1}(a)].
\end{align*}
Equivalently,
\begin{align*}
(\partial'_n \circ H_n(f_C))([c])
&= [f_{A,n-1}(a)] \\
&= H_{n-1}(f_A)([a]) \\
&= (H_{n-1}(f_A) \circ \partial_n)([c]).
\end{align*}
Since every element of $H_n(C_*)$ is represented by a cycle $c \in Z_n(C_*)$, the connecting square
\begin{align*}
H_{n-1}(f_A) \circ \partial_n = \partial'_n \circ H_n(f_C)
\end{align*}
commutes.
[guided]
We must prove that applying the connecting homomorphism first and then $H_{n-1}(f_A)$ gives the same result as applying $H_n(f_C)$ first and then the primed connecting homomorphism. Start with a class $[c] \in H_n(C_*)$, where $c \in Z_n(C_*)$.
The definition of $\partial_n$ begins by lifting $c$ through $p_n$. Since the sequence
\begin{align*}
0 \to A_n \xrightarrow{i_n} B_n \xrightarrow{p_n} C_n \to 0
\end{align*}
is exact, $p_n$ is surjective, so there exists $b \in B_n$ such that
\begin{align*}
p_n(b) = c.
\end{align*}
Because $c$ is a cycle and $p$ is a chain map,
\begin{align*}
p_{n-1}(d_{B,n}(b)) = d_{C,n}(p_n(b)) = d_{C,n}(c) = 0.
\end{align*}
Thus $d_{B,n}(b)$ lies in $\ker(p_{n-1})$. Exactness at $B_{n-1}$ says that
\begin{align*}
\ker(p_{n-1}) = \operatorname{im}(i_{n-1}),
\end{align*}
so there is a unique $a \in A_{n-1}$ with
\begin{align*}
i_{n-1}(a) = d_{B,n}(b).
\end{align*}
Before writing $[a]$, we must check that $a$ is a cycle. Since $i$ is a chain map,
\begin{align*}
i_{n-2}(d_{A,n-1}(a))
&= d_{B,n-1}(i_{n-1}(a)) \\
&= d_{B,n-1}(d_{B,n}(b)) \\
&= 0.
\end{align*}
Exactness at $A_{n-2}$ makes $i_{n-2}$ injective, so $d_{A,n-1}(a)=0$ and $a \in Z_{n-1}(A_*)$. The connecting homomorphism is well-defined by the lift and representative independence verified in the first step: changing the lift alters $a$ by a boundary in $A_{n-1}$, and changing $c$ by a boundary leaves the resulting homology class unchanged. Therefore
\begin{align*}
\partial_n([c]) = [a].
\end{align*}
Now follow the other route around the square. The class $H_n(f_C)([c])$ is represented by $f_{C,n}(c) \in C'_n$. To compute $\partial'_n([f_{C,n}(c)])$, we need a lift of $f_{C,n}(c)$ through $p'_n$. The natural candidate is $f_{B,n}(b)$, and it works because the chain-level square with $p_n$ commutes:
\begin{align*}
p'_n(f_{B,n}(b)) = f_{C,n}(p_n(b)) = f_{C,n}(c).
\end{align*}
Next compute the boundary of this lift in $B'_*$:
\begin{align*}
d_{B',n}(f_{B,n}(b)) = f_{B,n-1}(d_{B,n}(b)),
\end{align*}
where we used that $f_B$ is a chain map. Since $d_{B,n}(b) = i_{n-1}(a)$, and since the square with $i_{n-1}$ commutes, this becomes
\begin{align*}
d_{B',n}(f_{B,n}(b))
&= f_{B,n-1}(i_{n-1}(a)) \\
&= i'_{n-1}(f_{A,n-1}(a)).
\end{align*}
Therefore the element of $A'_{n-1}$ selected by the definition of $\partial'_n$ is precisely $f_{A,n-1}(a)$. Hence
\begin{align*}
\partial'_n(H_n(f_C)([c]))
&= \partial'_n([f_{C,n}(c)]) \\
&= [f_{A,n-1}(a)] \\
&= H_{n-1}(f_A)([a]) \\
&= H_{n-1}(f_A)(\partial_n([c])).
\end{align*}
This proves
\begin{align*}
\partial'_n \circ H_n(f_C) = H_{n-1}(f_A) \circ \partial_n.
\end{align*}
[/guided]
[/step]
[step:Conclude that the entire ladder of long exact sequences commutes]
The [long exact homology sequence](/theorems/4210) associated to a short exact sequence of chain complexes consists, in each degree, only of maps of the forms
\begin{align*}
H_n(i), \qquad H_n(p), \qquad \partial_n.
\end{align*}
The preceding steps prove commutativity of the corresponding squares for $H_n(i)$, for $H_n(p)$, and for $\partial_n$, for every $n \in \mathbb{Z}$. Therefore every square in the ladder between the two long exact homology sequences commutes, with vertical maps $H_n(f_A)$, $H_n(f_B)$, and $H_n(f_C)$ in the appropriate degrees. This proves the asserted naturality of the long exact homology sequence.
[/step]