If $X$ is a pseudocompact space and $Y$ is a second countable space then every continuous surjective map $f: X \to Y$ is $\mathbb{R}$-quotient Statement:
If $X$ is a pseudocompact space and $Y$ is a second countable space then every continuous surjective map $f: X \to Y$ is $\mathbb{R}$-quotient (that is, if $g: Y \to \mathbb{R}$ is such that $g \circ f$ is continuous then $g$ is continuous).
I don't understand the following proof of the above statement:
Proof:
Take any function $g: Y \to \mathbb{R}$ such that $g \circ f$ is continuous. Fix any closed set $F \subset \mathbb{R}$.
Let $d_F(x) = \inf\{|x-y|: y \in F\}$, $U_n = d_F^{-1}([0,1/n))$, then clearly $F = \cap U_n = \cap \overline{U}_n$. 
$H = (g \circ f)^{-1}(F)$ is closed in $X$ and $H = \cap V_n = \cap \overline{V}_n$, where $V_n = (g \circ f)^{-1}(U_n)$.
Therefore $G = g^{-1}(F) = \cap f(\overline{V}_n)$ (???)
...
The above proof is not complete, but the remaining part is not important to my question, so I skipped it. What I don't understand is the 4th line. Can somebody please help me?
 A: Suppose that $y\in g^{-1}[F]$. Then $y\in g^{-1}[U_n]$ for each $n\in\Bbb Z^+$, and 
$$f^{-1}[\{y\}]\subseteq f^{-1}\big[g^{-1}[U_n]\big]=(g\circ f)^{-1}[U_n]=V_n\tag{1}$$
for each $n\in\Bbb Z^+$. Thus, $y\in f[V_n]$ for each $n\in\Bbb Z^+$, and it follows that
$$g^{-1}[F]\subseteq\bigcap_{n\in\Bbb Z^+}f[V_n]\;.$$
Now suppose that $y\in\bigcap_{n\in\Bbb Z^+}f[V_n]$; we want to show that $g(y)\in F$. For each $n\in\Bbb Z^+$ we have $V_n=f^{-1}\big[g^{-1}[U_n]\big]$, and $f$ is surjective, so $f[V_n]=g^{-1}[U_n]$, and therefore $y\in g^{-1}[U_n]$ for each $n\in\Bbb Z^+$. Clearly, then, 
$$g(y)\in\bigcap_{n\in\Bbb Z^+}U_n=F\;,$$
and it follows that 
$$\bigcap_{n\in\Bbb Z^+}f[V_n]\subseteq g^{-1}[F]$$
and hence that
$$g^{-1}[F]=\bigcap_{n\in\Bbb Z^+}f[V_n]\subseteq\bigcap_{n\in\Bbb Z^+}f[\operatorname{cl}V_n]\;.$$
Finally, continuity of $g\circ f$ means that
$$\operatorname{cl}\left((g\circ f)^{-1}[U_n]\right)\subseteq(g\circ f)^{-1}[\operatorname{cl}U_n]$$
for each $n\in\Bbb Z^+$, so
$$\begin{align*}
\bigcap_{n\in\Bbb Z^+}f[\operatorname{cl}V_n]&=\bigcap_{n\in\Bbb Z^+}f\left[\operatorname{cl}\left((g\circ f)^{-1}[U_n]\right)\right]\\
&\subseteq\bigcap_{n\in\Bbb Z^+}f\left[(g\circ f)^{-1}[\operatorname{cl}U_n]\right]\\
&=\bigcap_{n\in\Bbb Z^+}f\left[f^{-1}\big[g^{-1}[\operatorname{cl}U_n]\big]\right]\\
&=\bigcap_{n\in\Bbb Z^+}g^{-1}[\operatorname{cl}U_n]&\text{since }f\text{ is surjective}\\
&=g^{-1}\left[\bigcap_{n\in\Bbb Z^+}\operatorname{cl}U_n\right]\\
&=g^{-1}[F]\;,
\end{align*}$$
and therefore
$$g^{-1}[F]=\bigcap_{n\in\Bbb Z^+}f[V_n]=\bigcap_{n\in\Bbb Z^+}f[\operatorname{cl}V_n]\;.$$
