Hatcher's Exercise 0.27 is :
$\mathbf{27.}$ Given a pair $(X,A)$ (this just means that $A$ is a subspace of a space $X$) and a homotopy equivalence $f:A \to B$, show that the natural map $X \to B \cup_f X$ is a homotopy equivalence if $(X,A)$ satisfies the HEP. [Hint: Consider $X\cup M_f$ and use the preceding problem.]
(Here $M_f$ is the mapping cylinder, obtained by identifying $(a,1)$ and $f(a)$ for $a \in A$ in $A \times I \coprod B$)
The preceding problem is :
$\mathbf{26.}$ Use Corollary 0.20 to show that if $(X,A)$ as the HEP, then $X \times I$ deformation retracts onto $X \times {0} ~\cup A \times I $. Deduce from this that Proposition 0.18 holds more generally for any pair $(X_1,A)$ satisfying the HEP.
Corollary 0.20 and Proposition 0.18 are :
$\mathbf{Corollary ~0.20.}$ If $(X,A)$ satisfies the HEP and the inclusion $A \to X$ is homotopy equivalence, then $A$ is a deformation retract of $X$.
$\mathbf{Proposition ~0.18.}$ If $(X_1,A)$ is a CW pair and we have attaching maps $f,g:A \to X_0$ that are homotopic, then $X_0 \cup_fX_1 \simeq X_0 \cup_gX_1$.
Now, my questions are the following:
Since $f:A \to B $ is a homotopy equivalence, the mapping cylinder $M_f$ deformation retracts onto both $A$ and $B$. Using this, and considering the hint, I showed that $X \cup M_f$ deformation retracts onto both $X$ and $B \cup_fX$. Thus, $X$ and $B \cup_fX$ are homotopy equivalent. But I know that this does not imply that the natural embedding $X \to B \cup_fX$ is a homotopy equivalence. I think that I have to use Exercise 0.26, but I have no idea. How do I have to proceed?
Does $X \cup M_f$ mean the attaching space $M_f \cup_g X$ where the attaching map $g:A \to M_f$ is given by $g(a)=q(a,0)$? (Here $q:A \times I \coprod B \to M_f$ is the quotient map.)
I searched google about this question and I found that this question is quite related about "cofibrations" and "pushouts". (I don't know these notions. Hatcher's book is my first AT book.) Are there some references to learn these?