First of all, observe that if you take $S^4$ and glue to it by two antipodal points two copies of $S^5$ you will obtain $S^5\vee S^4 \vee S^5$. Indeed you can just contract path between these two antipodal points obtaining homotopy equivalent space.
If you understand this, then you can simply take a quotient space by the antipodal map on $S^4.$ It identifies two copies of $S^5$ and on $S^4$ gives $\mathbb{R}P^4$ (you can see this directly from the definition of $\mathbb{R}P^4$ as a set of lines in $\mathbb{R}^5$).
Thus $S^5\vee S^4 \vee S^5$ is indeed a 2-sheeted cover of $\mathbb{R}P^4\vee S^5.$
Now we only need to compute some homotopy invariant that differs on these two spaces. And as you've said we can take $\pi_4.$
To compute $\pi_4$ observe that it is the same as $\pi_4(S^5)$ (since it is its universal cover) and thus is zero (by cellular approximation theorem). On the other hand $\pi_4(\mathbb{R}P^4\vee S^5)\cong\pi_4(S^5\vee S^4 \vee S^5)\cong\pi_4(S^4)\cong\mathbb{Z}.$ Where $\pi_4(\mathbb{R}P^4\vee S^5)\cong\pi_4(S^5\vee S^4 \vee S^5)$ because higher homotopy groups of covering space and base space are isomorphic. Next two equalities again follow from cellular approximation theorem. And the last equality is actually quite hard and requires Freudenthal suspension theorem. Thus we conclude that spaces are not homotopy equivalent.
As for your question of why we should take precisely $\pi_4$ and not some other homotopy group the answer is because we can compute it and it is different.
For example, $\pi_3$ of both spaces is trivial by cellular approximation theorem for universal covering spaces. We can take $\pi_5$ and it will be different, but the computation is far more difficult. In fact, computing higher homotopy groups of a wedge of spaces is generally (and even for spheres) an incredibly hard problem see for example this answer.