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.

I think that the most instructive proof is that of Proposition 5.3 of this file. Indeed, it shows that proper maps between locally compact topological spaces are always closed. This is a generalization of this discussion. I find it interesting since "standard" proofs tend to use sequences, and one might believe that everything might be lost without a metric.
By the way, a very nice corollary of the proposed exercise is that non-constant maps with the two properties are always surjective, since $f(\mathbb{R}^n)$ is connected.
