Let $p_0 : A \to X_0 $ and $p_1 : A \to X_1$ be two maps. I am confused about what does it mean to say that '$X_0$ and $X_1$ are homotopy equivalent under $A$'. Which of the following statements is this equivalent to :
1.) $\exists f: X_0 \to X_1, g: X_1 \to X_0$ such that $f \circ g \sim_{p_1} id_{X_1}$ and $g \circ f \sim_{p_0} id_{X_0}$
or
2.) $\exists f,g$ as in condition (1) which are further required to be maps under $A$ i.e. $f \circ p_0 =p_1$ and $g \circ p_1 = p_0$.
The confusion arises because problem 8 on page 207 of Algebraic Topology by Tammo tom Dieck asks to prove that homotopic attaching maps give rise to homotopy equivalent (under the lower dimension skeleton) CW-complexes. This does not seem to be true if one understands it to mean the stronger condition (2) while my intuition says that the correct meaning of the terminology is (2). Hence the confusion
The result is
Here is an example, which is somewhat trivial since both adjunction spaces are deformation retracting to $Y$, but it serve as an aid to see how the homotopy looks like.
Let $X=Y=I$ and $A=\{0\}$ and let $f_i(0)=i$ with the homotopy $H_s(0)=s$. We can think of $Z_0$ as $I×\{0\}\cup\{0\}×I$ and of $Z_1$ as $I×\{1\}\cup\{0\}×I$. If $g:Z_0\to Z_1$ is the map resulting from embedding $Z_0$ into $Z$ and then composing with the deformation retraction onto $Z_1$, and similarly for $h:Z_1\to Z_0$, then $hg$ sends $[0,1/2]×\{0\}$ and $[1/2,3/4]$ convex-linearly to $\{0\}×I$, and $[3/4,1]×\{0\}$ to $I×\{0\}$ with $hg(0,0)=(0,0),\ hg(1/2,0)=(0,1),\ hg(3/4,0)=(0,0)$, and $hg(1,0)=(1,0)$, and the homotopy draws the loop $g([0,3/4])$ into $I×\{0\}$.