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)$?** 



Homotopy domination of mapping cylinders with a special condition
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.


