Basic Homotopy Question I am starting to read the book "Rational Homotopy Theory" by Yves Felix, Stephen Halperin, J.-C. Thomas and I have a quick question about the very beginning (which only concerns basic homotopy theory in spaces and not even rational homotopy theory). The book proves a result referred to as "Whitehead's Lifting Lemma" as Lemma 1.5 (p. 12):

Suppose given a (not necessarily commutative) diagram:
\begin{array}{ccc}
A &\xrightarrow{\varphi} &Y \\
\ \downarrow i & &\ \downarrow f\\
X &\xrightarrow{\psi} &Z,
\end{array}
together with a with a homotopy $H: A \times I \rightarrow Z$ from $\psi i$ to $f\varphi$.
Assume $(X,A)$ is a relative CW-complex and $f$ is a weak homotopy equivalence. Then $\varphi$ and $H$ can be extended respectively to a map $\Phi: X \rightarrow Y$ and a homotopy $K: X \times I: \rightarrow Z$ from $\psi$ to $f \Phi$.

Then book continues with some corollaries, and my question is: How is the following statement a corollary of Whitehead's Lifting Lemma ?

If $(X, A)$ is a relative CW-complex and $A$ has the homotopy type of a CW-complex, then $X$ has the homotopy type of a CW-complex.

I think I could manage to prove this result by constructing a CW-complex $\tilde{X}$ from $\tilde{A}$ (a complex equivalent to $A$) by gluing cells using the attaching maps from $(X, A)$, and using a result of preservation of equivalences in pushouts (like this one Homotopy equivalences in pushout square with cofibration.) at each skeleton, but I do not see how that uses the Lemma above, and the result I would need about pushouts and equivalences appears later in the book I think.
Any insight is welcome, cheers!
 A: Let $A$ be a CW complex and $X$ obtained from $A$ by inductively attaching cells. Write $i:A\hookrightarrow X$ for the inclusion.
To begin let $p:\widetilde X\rightarrow X$ be a CW approximation (aka cellular model, see Th.1.4). Since $A$ is a CW complex the weak equivalence $p$ induces a bijection $p_*:[A,\widetilde X]\xrightarrow\cong[A,X]$ (see Co.1.6). Thus there is a map $\widetilde i:A\rightarrow\widetilde X$ together with a homotopy $H:p\widetilde i\simeq i$. Now consider the diagram
\begin{array}{ccc}
A &\xrightarrow{\widetilde i} &\widetilde X \\
\ i\downarrow & &\ \downarrow p\\
X &\xrightarrow{=} &X.
\end{array}
The assumptions of Lemma 1.5 are satisfied, so there is a map $\varphi:X\rightarrow\widetilde X$ such that $\varphi i=\widetilde i$ and $p\varphi\simeq id_X$. Thus $X$ is a (homotopy) retract of the CW complex $\widetilde X$, and it follows immediately from this that $X$ has CW homotopy type.
Now the last fact is true in the generality stated, but we will establish a more precise statement for the current situation: we will show that $X$ is homotopy equivalent to $\widetilde X$ as expected.
For this notice that $p_*:[\widetilde X,\widetilde X]\rightarrow [\widetilde X,X]$ takes $\varphi p$ to $p(\varphi p)=(p\varphi)p\simeq p$. But because $p$ is a weak equivalence the induced map is bijective, so the equation $p_*(\varphi p)=p_*(id_{\widetilde X})$ implies that $\varphi p\simeq id_{\widetilde X}$. Thus we have the claim.
