compactness property  I am a new user in Math Stack Exchange. I don't know how to solve part of this problem, so I hope that one of the users can give me a hand.
Let $f$ be a continuous function from $\mathbb{R}^{n}$ to $\mathbb{R}^{m}$ with the following properties:$A\subset \mathbb{R}^{n}$ is open then $f(A)$ is open. If $B\subset \mathbb{R}^{m}$ is compact then $f^{-1}(B)$ is compact.
I want to prove that $f( \mathbb{R}^{n}) $ is closed.

Take $y \in \overline{f(\mathbb{R}^n)}$.
Let $B_\varepsilon = \{x | d(x,y) \leq \varepsilon\}$.
Now,
$\emptyset \neq B_\varepsilon \cap f(\mathbb{R}^n) = f\left(f^{-1}(B_\varepsilon)\right)$.
Because $f^{-1}(B_\varepsilon)$ is compact, $B_\varepsilon \cap f(\mathbb{R}^n)$,
as the image of a compact by $f$, is a decreasing sequence of nonempty compact sets.
Therefore,
$\bigcap_\varepsilon (B_\varepsilon \cap f(\mathbb{R}^n))$ is nonempty.
Now,
$\emptyset \neq \bigcap_\varepsilon (B_\varepsilon \cap f(\mathbb{R}^n))
\subset
\bigcap_\varepsilon B_\varepsilon = \{y\}$
implies that $y \in f(\mathbb{R}^n)$.
That is, $f(\mathbb{R}^n) = \overline{f(\mathbb{R}^n)}$.
By the way, the only "clopen" sets in $\mathbb{R}^m$ are $\emptyset$ and
$\mathbb{R}^m$. Since $f(\mathbb{R}^n)$ is not empty, we have that
$f(\mathbb{R}^n) = \mathbb{R}^m$.
