[step:Construct an extension from a cocycle]
Let $c:P_1\to N$ be an $R$-linear map satisfying $c\circ d_2=0$. Define a submodule $S_c\subset N\oplus P_0$ by
\begin{align*}
S_c:=\{(-c(x),d_1(x)):x\in P_1\}.
\end{align*}
Define the left $R$-module
\begin{align*}
E_c:=(N\oplus P_0)/S_c,
\end{align*}
and let $q_c:N\oplus P_0\to E_c$ be the quotient map. Define $R$-linear maps
\begin{align*}
i_c:N&\to E_c,&
n&\mapsto q_c(n,0),\\
\pi_c:E_c&\to M,&
q_c(n,p)&\mapsto \varepsilon(p).
\end{align*}
The map $\pi_c$ is well-defined because if $(n,p)$ is changed by $(-c(x),d_1(x))$, then $\varepsilon(p+d_1(x))=\varepsilon(p)$.
We prove exactness. The equality $\pi_c\circ i_c=0$ follows from $\varepsilon(0)=0$. The map $\pi_c$ is surjective because $\varepsilon:P_0\to M$ is surjective. If $q_c(n,p)\in\ker\pi_c$, then $\varepsilon(p)=0$, so $p=d_1(x)$ for some $x\in P_1$. Therefore
\begin{align*}
q_c(n,p)
=q_c(n,d_1(x))
=q_c(n+c(x),0)
=i_c(n+c(x)),
\end{align*}
so $\ker\pi_c\subset\operatorname{im}i_c$. The reverse inclusion follows from $\pi_c\circ i_c=0$.
It remains to show that $i_c$ is injective. Suppose $i_c(n)=0$. Then $(n,0)\in S_c$, so there exists $x\in P_1$ such that
\begin{align*}
(n,0)=(-c(x),d_1(x)).
\end{align*}
Thus $d_1(x)=0$. Since $\ker d_1=\operatorname{im}d_2$, there exists $y\in P_2$ with $d_2(y)=x$. Hence
\begin{align*}
n=-c(x)=-c(d_2(y))=0,
\end{align*}
because $c\circ d_2=0$. Therefore
\begin{align*}
0\to N\xrightarrow{i_c}E_c\xrightarrow{\pi_c}M\to0
\end{align*}
is a short exact sequence.
[/step]