I want to prove $g$ is a quotient map and $X^*=\{g^{-1}(\{r\}):r\in \mathbb{R}$, then we know that there exists a homeomorphism from $X^* \to \mathbb{R}$. To prove continuity of $g$, I tried to prove for each $(x_0,y_0) \in \mathbb{R}\times \mathbb{R}$ and each neighborhood $V$ of $g(x_0,y_0)$, there is a neighborhood $U$ of $(x_0,y_0)$ such that $g(U)\subset V.$
So, I suppose $(x_0,y_0) \in \mathbb{R}\times \mathbb{R}$ and $V$ is a neighborhood of $g(x_0,y_0)$. Then $(x_0,y_0) \in g^{-1}(V) = A\times B$ for some $A,B \in \mathbb{R}$. Hence $x_0 \in A$ and $y_0 \in B$.
Then I want to say that there exists open interval $(a,b)$ and $(c,d)$ such that $x_0 \in (a,b) \subset A$ and $y_0 \in (c,d) \subset B$. Thus $g(( a,b), (c,d)) \subset V$.
I don't know if I can say there exists open interval $(a,b)$ and $(c,d)$ such that $x_0 \in (a,b) \subset A$ and $y_0 \in (c,d) \subset B$. If I want to say that, what statement supports this?

By Theorem 18.4, the map $h:\mathbb{R}\times\mathbb{R}\to \mathbb{R}\times\mathbb{R}$ given by $h(x,y)=(x,y^2)$ for all $x,y\in\mathbb{R}$ is continuous since each of its coordinate functions $h_1(x,y)= x,$ $h_2(x,y)= y^2$ is continuous. (The first coordinate function $h_1:\mathbb{R}\times \mathbb{R}\to \mathbb{R},$ $h_1(x,y)=x$ is a projection, hence continuous. And the other coordinate function $h_2:\mathbb{R}\times \mathbb{R}\to \mathbb{R}$ is given by $h_2(x,y)=y^2,$ which is continuous by Theorem 21.5.)
Moreover, the addition map $\mu:\mathbb{R}\times\mathbb{R}\to\mathbb{R},$ $\mu(x,y)=x+y$ is continuous by Lemma 21.4.
Hence the composition $g=\mu\circ h$ given by $$ g(x,y)=\mu\circ h(x,y)=x+y^2$$ for all $x,y\in \mathbb{R}$ is a continuous map being a composition of continuous maps.