$(M_f, X \cup Y)$ has the homotopy extension property Let $X,Y$ be spaces and $f:X \to Y$ a continuous map. I want to show that $(M_f, X \cup Y)$ has the homotopy extension property.
In the proof of Whitehead's theorem (Theorem 4.5 in Hatcher's Algebraic Topology), Hatcher says that this is obvious, but I can't see this even in intuition. How do I  have to show this? 
Here, we are regarding $X$ and $Y$ as subspaces of the mapping cylinder $M_f$.
 A: That a pair $(Z,C)$ has the homotopy extension property means nothing else than that the inclusion $C \to Z$ is a cofibration (see Hatcher chapter 4.A).
The following facts are well-known:


*

*Given a pushout diagram
$\require{AMScd}$
\begin{CD}
C  @>{f'}>> D \\
@A{j}AA @A{j'}AA \\
A @>{f}>> B\end{CD}
where $j$ is a cofibration, then $j'$ is a also a cofibration. See for example A cofibration induces a cofibration.

*Given a map $f : X \to Y$, the mapping cylinder $Z(f)$ occurs as the pushout
\begin{CD}
X \times I @>{f'}>> Z(f) \\
@A{i_0}AA @A{i_0'}AA \\
X @>{f}>> Y
\end{CD}
where $i_0(x) = (x,0)$. This can be shown by verifying that the universal property of the pushout is satisfied.

*The map $i_0$ is a cofibration. If "+" denotes disjoint union, then also the map $i : X + X \to X \times I$ given by $i(x) = (x,0)$ on the first summand and $i(x) = (x,1)$ on the second summand is a cofibration. This is equivalent to the fact that $(X \times I, X \times \{0\})$ and $(X \times I, X \times \{0,1\})$ have the homotopy extension property which can be easily verified (use the "retraction criterion" in Hatcher p.14).
Now let "+" denote disjoint union. Consider the diagram
\begin{CD}
X \times I @>{f'}>> Z(f) \\
@A{i}AA @A{(i_0',i_1)}AA \\
X +X @>{f + id }>> Y + X
\end{CD}
where $f'$ is the map from 2. and $(i_0',i_1)(y) = i_0'(y), (i_0',i_1)(x) = [x,1]$. I leave it as an exercise to you to show this is a pushout diagram. Simply verify that it has the universal property where you may invoke 2. Alternatively you can use the explicit construction of the pushout and you will see that $Z(f)$ is the quotient of $X \times I + Y + X$ under the equivalence relation generated by $y \sim (f(x),0)$ and $x  \sim (x,1)$.
But then 1. and 3. yield the desired result.
