Is the solution of this problem correct?
As I was given a hint that I should show the following:
1-build $\tilde{f}.$
2-show that $\tilde{f}$ induces homology isomorphism.
3-whitehead thm. of homology
4- $\tilde{f}$ induces another isomomorphism
5-use whitehead thm. of homotopy.
I do not see how this is included in the given solution, could anyone clarify this for me please? or may be the hints I got are wrong?

There are a few places where you need to be careful with your language; saying that spaces have isomorphic homotopy/homology groups is not the same as saying that some map between those spaces induces isomorphisms on homotopy/homology. For instance, it's not enough to have that $\pi_i(\tilde{X}) \cong \pi_i(X)$ for $i \geq 2$; we need (and have--this is what Hatcher's Proposition 4.1 says) that the covering map $\tilde{X} \to X$ induces isomorphisms $\pi_i(\tilde{X}) \to \pi_i(X)$ for $i \geq 2$.
Similarly, in your first paragraph, you want to say that since $\tilde{f}$ induces isomorphisms on homology, Corollary 4.33 implies that $f$ is a homotopy equivalence (not just that $X$ is homotopy equivalent to $Y$), and therefore $f$ induces isomorphisms $\pi_i(\tilde{X}) \to \pi_i(\tilde{Y})$.