For the real case: both $\mathbb{RP}^1 = S^1$ and $\mathbb{RP}^\infty$ are Eilenberg-MacLane spaces, respectively they are $K(\mathbb{Z}, 1)$ and $K(\mathbb{Z}/2\mathbb{Z}, 1)$. If you let $F$ be the homotopy fiber of the inclusion, then you have a long exact sequence:
$$\require{cancel}\dots \cancel{\pi_3(\mathbb{RP}^\infty) } \to \pi_2(F) \to \cancel{\pi_2(\mathbb{RP}^1)} \to \cancel{\pi_2(\mathbb{RP}^\infty)} \to \pi_1(F) \to \underbrace{\pi_1(\mathbb{RP}^1)}_{= \mathbb{Z}} \xrightarrow{\pi_1(\iota)} \underbrace{\pi_1(\mathbb{RP}^\infty)}_{= \mathbb{Z}/2\mathbb{Z}} \to \pi_0(F) \to \pi_0(\mathbb{RP}^1) \to \pi_0(\mathbb{RP}^\infty) \to 0$$
First, note that all the higher homotopy groups $\pi_n F$ vanish ($n > 1$). Both $\mathbb{RP}^1$ and $\mathbb{RP}^\infty$ are path connected, and of course the inclusion $\mathbb{RP}^1 \to \mathbb{RP}^\infty$ sends the only path component to the only path component. So the induced map on $\pi_0$ is a bijection. The exact sequence becomes:
$$0 \to \pi_1(F) \to \pi_1(\mathbb{RP}^1) \to \pi_1(\mathbb{RP}^\infty) \to \pi_0(F) \to 0.$$
The fundamental group only depends on the $2$-skeleton, hence you can restrict to the study of the inclusion $\mathbb{RP}^1 \to \mathbb{RP}^2$ for the induced map on $\pi_1$; it's more or less clear that it's the surjection $\mathbb{Z} \to \mathbb{Z}/2$ (the equator of $S^2$ is sent to a generator of $\pi_1(\mathbb{RP}^2)$ under the projection $S^2 \to \mathbb{RP}^2$; look at the proof that $\pi_1(\mathbb{RP}^2) = \mathbb{Z}/2$). Hence $\pi_0 F = 0$ (because $\pi_1\iota$ is surjective) and $\pi_1 F = \ker \iota = \mathbb{Z}$.
In the end you find that $F$ is of type $K(\mathbb{Z}, 1)$, hence homotopy equivalent to $S^1$.
For the complex case, use this question: the homotopy fiber is (homotopy equivalent to) $S^3$.