Homotopy equivalence of certain kinds of adjunction spaces Suppose that $X$, $Y$ and $Z$ are topological spaces, with $A\subset X$, a map $f:A\rightarrow Y$, and a homotopy equivalence $\phi:Y\rightarrow Z$. It seems fair to think that the adjunction spaces $Y\cup_{f}X$ and $Z\cup_{\phi\circ f}X$ will be homotopy equivalent provided that $(X,A)$ has the homotopy extension property.
A reasonable candidate for a homotopy equivalence seems to arise from the map $(Id,\phi):X+Y\rightarrow X+Z$ after passing to the quotient ($X+Y$ denotes disjoint union, and $(Id,\phi)$ is the map defined to be the identity on $X$ and $\phi$ on Y).
Any suggestions will be appreciated.
Thanks!
 A: Some cofibration assumptions are needed but the general result, a gluing theorem for homotopy equivalences,  is about a map of pushout diagrams, one of which is as you give and the other is say $g: B \to Z$, and $ B \subset W$,  in which say the vertical inclusion maps $ A \to X$, $B \to W$ are cofibrations. Then it says roughly: if the maps on $A,X,Y$ are homotopy equivalences, so is the map between the adjunction spaces. 
This result appeared I think first in the 1968 edition of my book which is now Topology and Groupoids  (2006), see 7.5.7 in that,  and is a standard result in abstract homotopy theory. However the proof in the book has the advantage of giving closer control over the homotopies involved.  
Many books on algebraic topology give invariants to show some spaces are not homotopy equivalent, but one also needs methods of proving directly that certain spaces are homotopy equivalent, and the gluing rule can be  a convenient tool for this, as examples in the book show. 
There is more detail and a cubical diagram on https://math.stackexchange.com/questions/184817
A: The short down-to-earth answer is that if the inclusion $A\to X$ has the homotopy extension property then the answer is yes. This is covered in, for example, Chapter $0$ of Hatcher's book Algebraic Topology (available for free at his web site).
EDIT: My memory was inaccurate. As Ronnie Brown points out, this result is not there. It should be there, perhaps as an exercise: derive it from Corollary 0.21.
A: Thanks to Tom Goodwillie and Ronnie Brown for their answers. Also thanks to Theo for pointing out that I posted the problem on  math.stackexchange.com/q/135173/5363.
After some thought it became clear that the pair $(X,A)$ needs to have the homotopy extension property (HEP). A simple counterexample is the following: 
Let $X=S^{1}$ (unit circle in the complex plane), $A=S^{1}-\{(1,0)\}=Y$, and $Z=\{(-1,0)\}$. The pair $(X,A)$ does not have the HEP, for if it did we would have a retraction $r$ of $X\times I$ onto $X\times\{0\}\cup A\times I$, which is not compact. The point $Z$ is a strong deformation retract of $Y$, and the deformation retraction is given by $(e^{2\pi i t},s)\mapsto e^{\pi i +(1-s)(2\pi i t-\pi i)}$.
Now, letting $f:A\rightarrow Y$ be the identity, we can easily see that $Y\cup_{f}X$ is a circle, while $Z\cup_{\phi\circ f}X$ is a 2-point space $\{a,b\}$ with the topology $\{\emptyset,\{a,b\},\{a\}\}$. This two spaces are not homotopy equivalent since the latter is contractible.
With the extra hypothesis that the pair $(X,A)$ has the HEP I believe that we can answer the original question I posted in the affirmative.
Proposition: Let $X,Y,Z$ be topological spaces. Suppose that $(X,A)$ has the HEP and that we have a map $f:A\rightarrow Y$ and a homotopy equivalence $\phi:Y\rightarrow Z$. Then the adjunction spaces $Y\cup_{f}X$ and $Z\cup_{\phi\circ f}X$ are homotopy equivalent.
Sketch of proof: The idea is to construct a topological space $W$ having both $Y\cup_{f}X$ and $Z\cup_{\phi\circ f}X$ as strong deformation retracts. For this we begin with the mapping cylinder $M_{\phi}$ of the homotopy equivalence $\phi$, and the map $F:A\times I\rightarrow M_{\phi}$ induced by the map $i\circ(f,Id):A\times I\rightarrow Y\times I + Z$ after passing to the quotient (Here $i$ is simply the inclusion of $Y\times I$ in the disjoint union $Y\times I + Z$, and $(f,Id)$ is the map defined to be $f$ on $A$ and the identity on $I$). Then, we define $W$ to be the adjunction space $M_{\phi}\cup_{F}(X\times I)$. 
In order to show that $W$ will be the right space for the job we need to combine two things:
First, For any $u\in I$, let $R_{u}=X\times u\cup A\times I$. The HEP of $(X,A)$ guarantees that $X\times I$ strong deformation retracts onto $R_{u}$. Indeed, the HEP gives us a retraction $r^{u}$ of $X\times I$ onto $R_{u}$. Note that $r^{u}$ has two components $(r_{1}^{u},r_{2}^{u})$, which we can use to define the strong deformation retraction by 
$$H_{u}(x,t,s)=(r_{1}^{u}(x,st),(1-s)t+sr_{2}^{u}(x,t)).$$
Now define 
$$(H_{u},\rho):X\times I\times I + M_{\phi}\times I\rightarrow X\times I + M_{\phi},$$
where $\rho(m,s)=m$ for all $s\in I$. Then, after passing to the quotient, this map induces a strong deformation retraction of $W$ onto $M_{\phi}\cup_{F}R_{u}$. In particular, $H_{0}$ and $H_{1}$ will induce strong deformation retractions of $W$ onto $M_{\phi}\cup_{F}R_{0}$ and $M_{\phi}\cup_{F}R_{1}$, respectively.
Second, Since $\phi$ is a homotopy equivalence, the mapping cylinder $M_{\phi}$ has its top $Y$ and bottom $Z$ as strong deformation retracts.
Now, combine the strong deformation retraction of $W$ onto $M_{\phi}\cup_{F}R_{0}$ with the strong deformation retraction of $M_{\phi}$ onto its bottom to yield a strong deformation retraction of $W$ onto $Z\cup_{\phi\circ f}X$. Similarly, combine the strong deformation retraction of $W$ onto $M_{\phi}\cup_{F}R_{1}$ with the strong deformation retraction of $M_{\phi}$ onto its top to yield a strong deformation retraction of $W$ onto $Y\cup_{f}X$.
Overall the idea seems right. Any insights will be appreciated.
Thanks!
