Classification of proper maps in topological spaces

How can I prove that if $f:X \to Y$ is continuous of locally compact, Hausdorff topological spaces, then $f$ is proper (inverses of compact sets are compact) iff it extends continuously as a map between the one point compactifications of $X$ and $Y$.

• You need $X$ and $Y$ to be locally compact Hausdorff in order for them to have one-point compactifications. – Qiaochu Yuan Sep 15 '14 at 1:40

Assume that $f$ is proper. Then we define $\hat f:\hat X\to\hat Y$ by $\hat f|_X=f$ and $\hat f(\infty_X)=\infty_Y$. Since $f$ is continuous on $X$ and $X$ is open in $\hat X$, the extension $\hat f$ is continuous at each point in $X$. So we only need to check the continuity at $\infty_X$. Take any open neighborhood $V$ around $\infty_Y$. What do you know about its complement and what can you conclude about its preimage?
Conversely, assume $f$ extends to a map $\hat f: \hat X \to\hat Y$ by setting $\hat f(\infty_X)=\infty_Y$. If $K$ is a compact set in $Y$, what does this mean for $\hat Y\setminus K$, and what does the continuity of $\hat f$ imply then?
• For the first part...The complement is compact, correct? So it's preimage is compact, so the complement of it's preimage is open. For the second part...the complement of $K$ is open, so the continuity of our new function implies the preimage is open, but then the complement of the preimage is compact. Am I correct so far? – Johnny Apple Sep 16 '14 at 19:17