If $h:X \to Y$ is a homeomorphism of metric spaces, how do I prove that $X$ is compact if and only if $Y$ is compact? If $h:X \to Y$ is a homeomorphism of metric spaces, how do I prove that $X$ is compact if and only if $Y$ is compact? 

I can't find the complete formal proof for it anywhere. 
My idea:
I assume I would take an open cover $\mathcal U$ of $f(X)$ by sets open in $Y$? Then since $f$ is continuous, $f^{-1}(U)$ is open in $X$ for all $U \in \mathcal U$? Or is that the wrong place to start?
Step by step help/solutions appreciated! 
 A: You may prove that continuous image of compact set is compact. So, given an open cover $\{G_{i}\}$ of $Y$, then $\{f^{-1}(G_{i})\}$ is an open cover of $X$, and then...
A: If $X$ is compact, let $\mathfrak{U} = \{U_i\}$ be a cover of $Y$. Then $h^{-1}(\mathfrak{U})$ has a finite subcover, $\mathcal{U}=\{h^{-1}(U_1),\ldots, h^{-1}(U_n)\}$ so that $h(\mathcal{U})$ is a finite subcover of $Y$. The same proof with $h$ replaced by $h^{-1}$ shows the other direction.
A: The continuous image of a compact set is compact.  (This can be proved using covers.)
Therefore, using the above fact:
*) if $X$ is compact, then so is $Y$ because $h$ is continuous.
*) if $Y$ is compact, then so is $X$ because $h^{-1}$ is continuous.
A: Since you're in a metric space, you may also look at the characterization of compactness in terms of sequences; $X$ is compact iff every sequence in $X$ has a convergent subsequence. 
Suppose $X$ is compact. You want to show $Y$ is compact. So, let $(y_{n})$ be any sequence in $Y$. Consider the corresponding sequence $(f^{-1}(y_{n}))$ in $X$. Since $X$ is compact, there is a subsequence $(f^{-1}(y_{n_{k}}))$ that converges in $X$. Since $f$ is a homeomorphism, $(y_{n_{k}})=(f(f^{-1}(y_{n_{k}})))$ converges in $Y$. 
Suppose $Y$ is compact. Let $(x_{n})$ be any sequence in $X$. Then, $(f(y_{n}))$ has a convergence subsequence $(f(x_{n_{k}}))$ in $Y$. Since $f^{-1}$ is a homeomorphism, $(x_{n_{k}})=(f^{-1}(f(x_{n_{k}})))$ converges in $X$, proving $X$ is compact. 
