Homotopy domination of mapping cylinders with a special condition Suppose that there exist continuous maps $f:Y\longrightarrow Z$ and $g:Z\longrightarrow Y$ so that $g\circ f\simeq 1_Y$. Also, let $h :X\longrightarrow Y$ be a  continuous map which induces an isomorphism of
fundamental groups. We know that $M_{h}\simeq Y$ and $M_{f\circ h}\simeq Z$, where $M_{h}=\frac{X\times I \cup Y}{(x,1)\sim h (x)}$ is the mapping cylinder of $h$. 
Is $\pi_2 (M_{h},X)$ a direct summand of  $\pi_2 (M_{f\circ h},X)$? 
 A: I think you can do the following : factor your map $F\colon M_h\to M_{f\circ h}$ as the inclusion $i\colon M_h\hookrightarrow M_h\cup_Y M_f$ followed by a map $q\colon M_h\cup_Y M_f\to M_{f\circ h}$. Then, construct a retract $r\colon M_h\cup_Y M_f\to M_h$. It is then enough to prove that the map $M_h\cup_Y M_f\to M_{f\circ h}$ is a weak-equivalence.
Let us first construct the map $q\colon M_h\cup_Y M_f\to M_{f\circ h}$ and show that it is a weak-equivalence. Consider the pushout diagram defining $M_h\cup_Y M_f$, where $i_0(y)=(y,0)$.
$$\require{AMScd}\begin{CD}
Y@>i_0>>M_f\\
@VjVV@VV\widetilde{j}V\\
M_{h}@>i>>M_h\cup_Y M_f\\
\end{CD}$$
To define $q$, it is enough to define two maps $q_f\colon M_f\to M_{f\circ h}$ and $q_h\colon M_h\to M_{f\circ h}$ such that $q_f\circ i_0= q_h\circ j$.
Set $q_f$ as the composition $M_f\to Z\hookrightarrow M_{f\circ h}$ and define $q_h$ via $q_h(x,t)=(x,t), q_h(y)=f(y)$. This defines the desired map $q\colon M_h\cup_ Y M_f\to M_{f\circ h}$.
Now, $\widetilde{j}$ and $q_f$ are homotopy equivalences, and so $q$ must induce isomorphisms on all homotopy groups. Since $q_{|X}\colon X\hookrightarrow M_{f\circ h}$ is equal to the inclusion, we have that $q$ induces isomorphisms on all relative homotopy groups. 
Now, we define $r\colon M_h\cup_Y M_f\to M_{h}$. As earlier, it is enough to define $r_f\colon M_f\to M_h$ and $r_h\colon M_h\to M_h$, such that $r_f\circ i_0=r_h\circ j$. Take $r_h=Id_{M_h}$ and define $r_f$ via : $r_f(y,t)= H(y,t)$, and $r_f(z)=g(z)$. This defines $r$ such that $r\circ i= Id_{M_h}$.
Putting everything together, we have that the composite $M_h\xrightarrow{i} M_h\cup_Y M_f\xrightarrow{r} M_h$ is equal to the identity, and $\pi_n(M_h\cup_Y M_f,X)\simeq \pi_n(M_{f\circ h},X)$. This should imply the result you want.
A: This is a comment with a commutative diagram rather than a full answer.
Let $H\colon Y\times I\to Y$ be a homotopy between $\operatorname{id}_Y$ and $g\circ f$.
I though defining $G$ using the diagram
$$\require{AMScd}\begin{CD}
X\times I@>H\circ(h\times\operatorname{id}_I)>>Y\times I\\
@VVV@VVV\\
M_{f\circ h}@>>>Y\times I@>r>\sim>M_h\\
@AAA@AAA\\
Z@>g>>Y\rlap{\;,}
\end{CD}$$
where $r$ is a strong deformation retract from $Y\times I$ to $M_h$.
This definitely works if $h$ is a cofibration, and it seems that one can use $H$ to construct the homotopy between $G\circ F$ and $\operatorname{id}_{M_h}$.
