Let $X$ be a simply-connected $n$-dimensional CW complex. The goal is to show that any (continuous) $f : X \rightarrow \mathbb RP^{n+1}$ is homotopic to a constant map.
Let $p : S^{n+1} \rightarrow \mathbb RP^{n+1}$ be the usual double cover.
By the lifting property, there exists $\tilde{f} : X \rightarrow S^{n+1}$ such that $f \equiv p\circ \tilde{f}$. Beyond this, I am not sure how to proceed.
I would appreicate any hint or reference!
It suffices to show that the lift $\bar f : X \to S^{n+1}$ is homotopic to a constant map.
The space $S^{n+1}$ has a CW-structure with one $0$-cell and one $(n+1)$-cell. The cellular approximation theorem implies that $\bar f$ is homotopic to a cellular map $\phi : X \to S^{n+1}$. Since $\dim X \le n$, the image $\phi(X)$ is contained in the $n$-skeleton of $S^{n+1}$ which is a one-point space. This means that $\phi$ is constant.