The homotopy category of complexes I have some trouble in proving Exercise A3.51 of Eisenbud's book "Commutative Algebra with a view toward Algebraic Geometry", pag. 688.
The solution is sketched at pag. 754 at the end of the book. The only step that is not clear to me is how to prove that the maps labelled $h$ e $k$ (of the diagram of pag. 755) give the surjection claimed. 
Thank you
 A: We write down the problem statement for clarity:
Exercise A3.51 (The category $K^+(\mathcal{M})$ is not Abelian): In an Abelian category, every morphism $A \to C$ can be factored into an epimorphism followed by a monomorphism $A \twoheadrightarrow B \rightarrowtail C$. Show that the natural map $\mathbf{Z} \to \mathbf{Z}/(p)$ gives rise to a map of complexes
$$A = \{\cdots \to 0 \to \mathbf{Z} \to 0 \to \cdots\} \to \{\cdots \to 0 \to \mathbf{Z}/(p) \to 0 \to \cdots\} = C$$
that cannot be factored in this way in $K^+(\mathcal{M})$.
Proof. Suppose $\alpha\colon A \twoheadrightarrow B$ and $\beta\colon B \rightarrowtail
C$ form such a factorization. Let $C\alpha$, $C\beta$ be the respective mapping cones. The composition $A
\twoheadrightarrow B \to C\alpha$ is then homotopic to zero, as is $C\beta[-1] \to B
\rightarrowtail C$; by the universal properties of epimorphisms and monomorphisms,
we then have that $B \to C\alpha$ is homotopic to zero, as is $C\beta[-1] \to
B$. This gives rise to the diagram
$\hskip1.7in$
where the diagonal maps give the homotopies $(C\beta[-1] \to B) \simeq 0$ and
$(B \to C\alpha) \simeq 0$.
We first show that the complex $B$ is split. Let
$$s_n = \begin{cases}
  h_n & n \ne -1\\
  k_n & n = -1
\end{cases}$$
For all $n \ne 0$, we have $\mathrm{id} = dh_n + h_{n-1}d$, and so applying $d$,
we have $d = d^2h_n + dh_{n-1}d = dh_{n-1}d = ds_{n-1}d$, and similarly if $n=0$ we have $d = dk_{-1}d = ds_{-1}d$, so $B$ is indeed split.
Now we claim that $B$ is chain homotopy equivalent to a complex concentrated in degree $0$. Since $B$ is split, it suffices to show the homology of $B$ is concentrated in degree $0$, by Bourbaki, Algèbre Ch. X, §2, Prop. 6. But away from degree $0$, by either looking at the map $C\beta[-1] \to B$ or $B \to C\alpha$, we see that the identity $B_n \to B_n$ induces the zero map on homology because of $\alpha,\beta$ are null-homotopic. But the map on homology is also an isomorphism, hence all homology groups away from degree $0$ are trivial.
Thus, in the homotopy category we can assume without loss of generality that $B$ is concentrated in degree zero, and so the diagram above becomes
$\hskip2.2in$
and $h$, $k$ are (possibly different) maps from before that form the homotopies with the zero maps. By definition of homotopy, we then have that the composition $B_0 \to \mathbf{Z}/(p) \overset{h}{\to} B_0 \overset{k}{\to} \mathbf{Z} \to B_0$ must be the identity. But this is impossible since $\operatorname{Hom}(\mathbf{Z}/(p),\mathbf{Z}) = 0$. $\blacksquare$
