[proofplan]
The mapping cone is built degreewise as a direct sum $D_n \oplus C_{n-1}$, so the proposed maps are the inclusion into the first summand and the projection onto the second summand. We first verify that the cone differential squares to zero, using exactly the chain map identity for $f$. Then we check that $i$ and $p$ commute with the differentials, where the sign in the shifted complex $C[-1]$ is what makes $p$ a chain map. Finally, degreewise injectivity, surjectivity, and the equality $\ker p_n = \operatorname{im} i_n$ give exactness.
[/proofplan]
[step:Verify that the mapping cone differential squares to zero]
Fix $n \in \mathbb{Z}$ and let $(y,x) \in D_n \oplus C_{n-1}$. Since $f: C \to D$ is a chain map, the degree $n-1$ chain map identity is
\begin{align*}
d_{D,n-1} \circ f_{n-1} = f_{n-2} \circ d_{C,n-1}.
\end{align*}
Using the definition of $d_{\operatorname{Cone}(f)}$, we compute
\begin{align*}
d_{\operatorname{Cone}(f),n-1}\bigl(d_{\operatorname{Cone}(f),n}(y,x)\bigr)
&= d_{\operatorname{Cone}(f),n-1}\bigl(d_{D,n}(y) + f_{n-1}(x), -d_{C,n-1}(x)\bigr) \\
&= \bigl(d_{D,n-1}(d_{D,n}(y) + f_{n-1}(x)) + f_{n-2}(-d_{C,n-1}(x)), \\
&\qquad\qquad -d_{C,n-2}(-d_{C,n-1}(x))\bigr) \\
&= \bigl(d_{D,n-1}d_{D,n}(y) + d_{D,n-1}f_{n-1}(x) - f_{n-2}d_{C,n-1}(x), \\
&\qquad\qquad d_{C,n-2}d_{C,n-1}(x)\bigr) \\
&= (0,0).
\end{align*}
The last equality uses $d_D^2 = 0$, $d_C^2 = 0$, and $d_{D,n-1}f_{n-1} = f_{n-2}d_{C,n-1}$. Hence $\operatorname{Cone}(f)$ is a chain complex.
[/step]
[step:Show that the inclusion into the cone is a chain map]
For each $n \in \mathbb{Z}$, the map $i_n: D_n \to D_n \oplus C_{n-1}$ is $R$-linear by linearity of the direct-sum inclusion. For $y \in D_n$,
\begin{align*}
d_{\operatorname{Cone}(f),n}(i_n(y))
&= d_{\operatorname{Cone}(f),n}(y,0) \\
&= \bigl(d_{D,n}(y) + f_{n-1}(0), -d_{C,n-1}(0)\bigr) \\
&= (d_{D,n}(y),0) \\
&= i_{n-1}(d_{D,n}(y)).
\end{align*}
Therefore $d_{\operatorname{Cone}(f),n} \circ i_n = i_{n-1} \circ d_{D,n}$ for every $n$, so $i: D \to \operatorname{Cone}(f)$ is a chain map.
[/step]
[step:Use the shifted sign to show that projection from the cone is a chain map]
For each $n \in \mathbb{Z}$, the map $p_n: D_n \oplus C_{n-1} \to C_{n-1}$ is $R$-linear by linearity of the direct-sum projection. For $(y,x) \in D_n \oplus C_{n-1}$,
\begin{align*}
p_{n-1}\bigl(d_{\operatorname{Cone}(f),n}(y,x)\bigr)
&= p_{n-1}\bigl(d_{D,n}(y) + f_{n-1}(x), -d_{C,n-1}(x)\bigr) \\
&= -d_{C,n-1}(x) \\
&= d_{C[-1],n}(x) \\
&= d_{C[-1],n}(p_n(y,x)).
\end{align*}
Thus $p_{n-1} \circ d_{\operatorname{Cone}(f),n} = d_{C[-1],n} \circ p_n$ for every $n$, so $p: \operatorname{Cone}(f) \to C[-1]$ is a chain map.
[guided]
The only point that needs attention is the sign in the shifted complex. The target of $p_n$ is $C[-1]_n = C_{n-1}$, and the differential on $C[-1]$ is not $d_C$ but $-d_C$. Therefore, after applying the cone differential to a pair $(y,x) \in D_n \oplus C_{n-1}$, the second component is already exactly the shifted differential of $x$:
\begin{align*}
p_{n-1}\bigl(d_{\operatorname{Cone}(f),n}(y,x)\bigr)
&= p_{n-1}\bigl(d_{D,n}(y) + f_{n-1}(x), -d_{C,n-1}(x)\bigr) \\
&= -d_{C,n-1}(x).
\end{align*}
On the other hand,
\begin{align*}
d_{C[-1],n}(p_n(y,x))
&= d_{C[-1],n}(x) \\
&= -d_{C,n-1}(x).
\end{align*}
The two expressions agree for every $(y,x)$, so $p$ commutes with the differentials and is a chain map. This is precisely why the shifted complex $C[-1]$ carries the differential $-d_C$.
[/guided]
[/step]
[step:Check degreewise exactness of the sequence]
Fix $n \in \mathbb{Z}$. The map $i_n: D_n \to D_n \oplus C_{n-1}$ is injective because $i_n(y) = (0,0)$ implies $(y,0) = (0,0)$, hence $y = 0$. The map $p_n: D_n \oplus C_{n-1} \to C_{n-1}$ is surjective because, for every $x \in C_{n-1}$, the element $(0,x) \in D_n \oplus C_{n-1}$ satisfies
\begin{align*}
p_n(0,x) = x.
\end{align*}
Finally,
\begin{align*}
\ker p_n
&= \{(y,x) \in D_n \oplus C_{n-1} : p_n(y,x) = 0\} \\
&= \{(y,x) \in D_n \oplus C_{n-1} : x = 0\} \\
&= \{(y,0) : y \in D_n\} \\
&= \operatorname{im} i_n.
\end{align*}
Thus
\begin{align*}
0 \longrightarrow D_n \xrightarrow{i_n} \operatorname{Cone}(f)_n \xrightarrow{p_n} C[-1]_n \longrightarrow 0
\end{align*}
is an exact sequence of $R$-modules for every $n \in \mathbb{Z}$.
[/step]
[step:Conclude that the degreewise exact sequence is a short exact sequence of complexes]
The previous steps show that $D$, $\operatorname{Cone}(f)$, and $C[-1]$ are chain complexes, that $i$ and $p$ are chain maps, and that the induced sequence is exact in every degree. Therefore
\begin{align*}
0 \longrightarrow D \xrightarrow{i} \operatorname{Cone}(f) \xrightarrow{p} C[-1] \longrightarrow 0
\end{align*}
is a short exact sequence of chain complexes.
[/step]