[proofplan]
We verify the chain map identities degree by degree. The inclusions $j_D$ and $j_C$ are compatible with the mapping cylinder differential because that differential restricts to $d_D$ on the displayed copy of $D$ and to $d_C$ on the displayed copy of $C$. For the projection $q$, the two terms involving the suspension coordinate cancel after applying $f$, and the remaining equality is exactly the chain map identity for $f$. The two factorisation identities then follow by evaluating the composites on homogeneous elements.
[/proofplan]
[step:Check that the inclusion of $D$ commutes with the differentials]
Fix $n \in \mathbb{Z}$ and let $y \in D_n$. The map $(j_D)_n: D_n \to \operatorname{Cyl}(f)_n$ is defined by $(j_D)_n(y) = (y,0,0)$. Applying the mapping cylinder differential gives
\begin{align*}
d_{\operatorname{Cyl}(f)}(j_D)_n(y)
&= d_{\operatorname{Cyl}(f)}(y,0,0) \\
&= \bigl(d_D y - f_{n-1}(0),\, d_C 0 + 0,\, -d_C 0\bigr) \\
&= (d_D y,0,0) \\
&= (j_D)_{n-1}(d_D y).
\end{align*}
Thus
\begin{align*}
d_{\operatorname{Cyl}(f)} \circ (j_D)_n = (j_D)_{n-1} \circ d_D
\end{align*}
for every $n \in \mathbb{Z}$, so $j_D: D \to \operatorname{Cyl}(f)$ is a chain map.
[/step]
[step:Check that the inclusion of $C$ commutes with the differentials]
Fix $n \in \mathbb{Z}$ and let $x \in C_n$. The map $(j_C)_n: C_n \to \operatorname{Cyl}(f)_n$ is defined by $(j_C)_n(x) = (0,x,0)$. Applying the mapping cylinder differential gives
\begin{align*}
d_{\operatorname{Cyl}(f)}(j_C)_n(x)
&= d_{\operatorname{Cyl}(f)}(0,x,0) \\
&= \bigl(d_D 0 - f_{n-1}(0),\, d_C x + 0,\, -d_C 0\bigr) \\
&= (0,d_C x,0) \\
&= (j_C)_{n-1}(d_C x).
\end{align*}
Thus
\begin{align*}
d_{\operatorname{Cyl}(f)} \circ (j_C)_n = (j_C)_{n-1} \circ d_C
\end{align*}
for every $n \in \mathbb{Z}$, so $j_C: C \to \operatorname{Cyl}(f)$ is a chain map.
[/step]
[step:Use the chain map identity for $f$ to prove that $q$ commutes with the differentials]
Fix $n \in \mathbb{Z}$ and let $(y,x,s) \in \operatorname{Cyl}(f)_n = D_n \oplus C_n \oplus C_{n-1}$. Thus $y \in D_n$, $x \in C_n$, and $s \in C_{n-1}$. By the definition of $q_{n-1}: \operatorname{Cyl}(f)_{n-1} \to D_{n-1}$ and of $d_{\operatorname{Cyl}(f)}$, we have
\begin{align*}
q_{n-1}\bigl(d_{\operatorname{Cyl}(f)}(y,x,s)\bigr)
&= q_{n-1}\bigl(d_D y - f_{n-1}(s),\, d_C x + s,\, -d_C s\bigr) \\
&= d_D y - f_{n-1}(s) + f_{n-1}(d_C x + s) \\
&= d_D y - f_{n-1}(s) + f_{n-1}(d_C x) + f_{n-1}(s) \\
&= d_D y + f_{n-1}(d_C x).
\end{align*}
Since $f: C \to D$ is a chain map, $f_{n-1}(d_C x) = d_D(f_n(x))$. Therefore
\begin{align*}
q_{n-1}\bigl(d_{\operatorname{Cyl}(f)}(y,x,s)\bigr)
&= d_D y + d_D(f_n(x)) \\
&= d_D\bigl(y + f_n(x)\bigr) \\
&= d_D(q_n(y,x,s)).
\end{align*}
Hence
\begin{align*}
q_{n-1} \circ d_{\operatorname{Cyl}(f)}
=
d_D \circ q_n
\end{align*}
for every $n \in \mathbb{Z}$, so $q: \operatorname{Cyl}(f) \to D$ is a chain map.
[guided]
We must prove the chain map identity for $q$, namely that applying the mapping cylinder differential first and then $q$ gives the same result as applying $q$ first and then the differential of $D$. Fix $n \in \mathbb{Z}$ and take an arbitrary element
\begin{align*}
(y,x,s) \in \operatorname{Cyl}(f)_n = D_n \oplus C_n \oplus C_{n-1}.
\end{align*}
This means $y \in D_n$, $x \in C_n$, and $s \in C_{n-1}$.
First apply the mapping cylinder differential:
\begin{align*}
d_{\operatorname{Cyl}(f)}(y,x,s)
=
\bigl(d_D y - f_{n-1}(s),\, d_C x + s,\, -d_C s\bigr).
\end{align*}
This element lies in
\begin{align*}
D_{n-1} \oplus C_{n-1} \oplus C_{n-2}
=
\operatorname{Cyl}(f)_{n-1},
\end{align*}
so we may apply $q_{n-1}: \operatorname{Cyl}(f)_{n-1} \to D_{n-1}$. By definition, $q_{n-1}(a,b,t) = a + f_{n-1}(b)$ for $a \in D_{n-1}$, $b \in C_{n-1}$, and $t \in C_{n-2}$. Therefore
\begin{align*}
q_{n-1}\bigl(d_{\operatorname{Cyl}(f)}(y,x,s)\bigr)
&= q_{n-1}\bigl(d_D y - f_{n-1}(s),\, d_C x + s,\, -d_C s\bigr) \\
&= d_D y - f_{n-1}(s) + f_{n-1}(d_C x + s).
\end{align*}
Now use $R$-linearity of $f_{n-1}: C_{n-1} \to D_{n-1}$:
\begin{align*}
f_{n-1}(d_C x + s) = f_{n-1}(d_C x) + f_{n-1}(s).
\end{align*}
Substituting this into the previous expression gives the cancellation of the two $s$-terms:
\begin{align*}
q_{n-1}\bigl(d_{\operatorname{Cyl}(f)}(y,x,s)\bigr)
&= d_D y - f_{n-1}(s) + f_{n-1}(d_C x) + f_{n-1}(s) \\
&= d_D y + f_{n-1}(d_C x).
\end{align*}
The remaining term is where the hypothesis that $f$ is a chain map is used. The chain map identity says
\begin{align*}
d_D \circ f_n = f_{n-1} \circ d_C,
\end{align*}
so, evaluated at $x \in C_n$,
\begin{align*}
f_{n-1}(d_C x) = d_D(f_n(x)).
\end{align*}
Thus
\begin{align*}
q_{n-1}\bigl(d_{\operatorname{Cyl}(f)}(y,x,s)\bigr)
&= d_D y + d_D(f_n(x)) \\
&= d_D\bigl(y + f_n(x)\bigr) \\
&= d_D(q_n(y,x,s)).
\end{align*}
Since this holds for every degree $n$ and every element $(y,x,s) \in \operatorname{Cyl}(f)_n$, the map $q: \operatorname{Cyl}(f) \to D$ is a chain map.
[/guided]
[/step]
[step:Evaluate the two composites on homogeneous elements]
Fix $n \in \mathbb{Z}$. For $y \in D_n$, the composite $(q \circ j_D)_n: D_n \to D_n$ satisfies
\begin{align*}
(q \circ j_D)_n(y)
&= q_n((j_D)_n(y)) \\
&= q_n(y,0,0) \\
&= y + f_n(0) \\
&= y.
\end{align*}
Hence $q \circ j_D = \operatorname{id}_D$.
For $x \in C_n$, the composite $(q \circ j_C)_n: C_n \to D_n$ satisfies
\begin{align*}
(q \circ j_C)_n(x)
&= q_n((j_C)_n(x)) \\
&= q_n(0,x,0) \\
&= 0 + f_n(x) \\
&= f_n(x).
\end{align*}
Hence $q \circ j_C = f$. Together with the previous steps, this proves the stated factorisation identities by chain maps.
[/step]