Proving that this function is a homeomorphism into $\Bbb R^n$ From Rotman's Algebraic Topology:

For each $n \ge 1$, $\Bbb R P^n$ is obtained from $\Bbb R P^n$ by attaching an $n$-cell, moreover, there is a disjoint union $$\Bbb RP^n = e^0 \cup \dots \cup e^n$$, where $e^n$ is an $n$-cell.

Partial proof:

If $x = (x_1, \dots, x_{n+1}) \in S^{n}$, denote its equivalence class in $\Bbb RP^n$ by $[x] = [x_1, \dots, x_{n+1}]$.  Define $e = \{[x] \in \Bbb R P^n : x_{n+1} \neq 0\}$.  The complement $Y$ of $e$ in $\Bbb R P^n$ is just $\Bbb RP^{n-1}$.  Also, $e$ is an $n$-cell, for $e \cong \Bbb R^n$ via $g : [x] \mapsto (x_{n+1}^{-1}x_1, \dots, x_{n+1}^{-1}x_n)$.

Why is $g$ a homeomorphism?  I'm having a hard time finding a way to show this.  Anyone have any ideas?
 A: We are looking for a solution to:
$$\big(x^{-1}_{n+1}x_1,\ldots,x^{-1}_{n+1}x_n\big)=(y_1,\ldots,y_n)$$
$$x_1^2+\cdots+x_{n+1}^2=1$$
Note the implicit $x_{n+1}\neq 0$ constraint.
The second equation simply means that we are looking for a solution in $S^n$ (it seems that for the author $\mathbb{R}P^n$ is a quotient of $S^n$, which is fine). From the first equation we get
$$x_i=x_{n+1}y_i\text{ for }i=1,\ldots,n$$
which is better, but still $x_i$ depends on $x_{n+1}$. So we need to find that special last coordinate $x_{n+1}$. It cannot be arbitrary, because of the second equation. So lets combine what we have with the second equation:
$$(x_{n+1}y_1)^2+\cdots+(x_{n+1}y_n)^2+x_{n+1}^2=1$$
$$x_{n+1}^2\cdot\big(y_1^2+\cdots+y_{n+1}^2+1\big)=1$$
$$x_{n+1}=\pm\sqrt{\frac{1}{1+\sum y_i^2}}$$
Note that $x_{n+1}$ is always well defined and nonzero. With this we have a clear formula for $(x_1,\ldots,x_{n+1})$ that depends on $(y_1,\ldots,y_n)$ only.
Finally we can write the inverse explicitly
$$h:\mathbb{R}^n\to e$$
$$h(x_1,\ldots, x_n)=\big[u x_1,\ldots,u x_n,u\big]$$
$$u=\sqrt{\frac{1}{1+\sum x_i^2}}$$
I leave as an exercise that it is well defined and continuous.
Edit: Answering the question "why $g$ and $h$ are continuous?".
For $h$ let $S_0^n=\{(x_1,\ldots,x_{n+1})\in S^n\ |\ x_{n+1}\neq 0\}$ and consider the quotient map $\pi:S_0^n\to e$, $\pi(v)=[v]$. Clearly our $h$ is the composition of $h':\mathbb{R}^n\to S_0^n$, $h'(x_1,\ldots, x_n)=\big(u x_1,\ldots,u x_n,u\big)$ with $\pi$ so $h$ is continuous if and only if $h'$ is. And $h'$ is continuous because it is a composition of continuous functions: projection, addition, multiplication, fraction and square root.
$g$ on the other hand is continuous because it arises from a continuous $$g':S_0^n\to\mathbb{R}^n$$
$$g'(x_1,\ldots,x_{n+1})=(x_{n+1}^{-1}x_1, \ldots, x_{n+1}^{-1}x_n)$$
via universal property of quotients.
