Classification of Proper Maps between domains in $\mathbb{R}^n$ Suppose $f:D_1\to D_2$ is a continuous map between domains in $\mathbb{R}^n$. Show that $f$ is proper iff for every sequence  $(x_n)$ in $D_1$ which accumulates only on $\partial D_1\cup\{\infty\}$, we have that $(f(x_n))$ accumulates only on  $\partial D_2\cup\{\infty\}$. [$\partial D$ denotes boundary of $D$.]

Definition: A map $f:X \to Y$ is called proper if $f^{-1}(K)$ is compact for every set $K$ compact in $Y$. 

Can someone please give some hints/ideas. Is this problem a consequence of some famous theorem?
 A: I assume that by "domain" we mean an open, connected subset of $\mathbb{R}^n$. Note, in particular, that if $D$ is a domain and $K\subseteq D$, then $K\cap \partial D=\varnothing$. Let's solve this using the contrapositives.
First suppose that $f$ is not proper. Then there exists a compact set $K\subseteq D_2$ such that $f^{-1}(K)$ is not compact. But since $f$ is continuous, so $f^{-1}(K)$ is already closed, so it must be unbounded. Then there exists a sequence $(x_n)$ in $f^{-1}(K)$ such that $\Vert x_n\Vert\to\infty$, (so $(x_n)$ only accumulates at $\left\{\infty\right\}$). On the other hand, $(f(x_n))\subseteq K$, so $(f(x_n))$ accumulates at some point of $K$, which does not belong to $\partial D_2\cup\left\{\infty\right\}$.
Conversely, suppose that there exists some sequence $(x_n)$ in $D_1$ which accumulates only at $\partial D_1\cup\left\{\infty\right\}$, but $(f(x_n))$ accumulates at some point not in $\partial D_2\cup\left\{\infty\right\}$, i.e., at some point of $D_2$. Considering a subsequence if necessary, assume that $f(x_n)$ converges to a point $y\in D_2$. The set $K=\left\{f(x_n):n\in\mathbb{N}\right\}\cup\left\{y\right\}$ is compact in $D_2$. Let's show that $f^{-1}(K)$ is not compact. If $\left\{x_n:n\in\mathbb{N}\right\}$ is unbounded, then $f^{-1}(K)$, which contains this set, is unbounded as well, so we are done. If not, then $\left\{x_n\right\}$ accumulates at some point $z$ of $\partial D_1$. Since $D_1$ is open, $D_1$ is disjoint with $\partial D_1$, so $z\not\in D_1$ and in particular $z\not\in f^{-1}(K)$. This shows that $f^{-1}(K)$ is not closed in $\mathbb{R}^n$, and thus it cannot be compact in $D_1$ (recall that compactness is independent of the ambient space).
