Let $A, B$ be subsets of a metric space $X$. If $A$ is compact and $B$ is closed, show that the distance between $A$ and $B$ is achieved.
Attempt at a proof:
Let $A$ be compact and $B$ be closed. Let $m=d(A,B)=\inf_{b\in B} d(A,B)$. Then, there are two possibilities:
(a) $\exists b\in B$, $d(a,b)=m$. If this is the case, we're done.
(b) $\forall b\in B$, $d(a,b)>m$. In this case,
there exists a sequence $\{b_n\}\subseteq B:$ $d(a,b_n)\rightarrow m$ as $n\rightarrow\infty$ by definition of infinum. Then there exists a subsequence $\{b_{n_k}\}$: $d(b_{n_1},a)>d(b_{n_2},a)>...$ which is monotonic decreasing. Then note that $d(b_{n_k},a)<d(b_{n_1},a)<\infty$. So it's a bounded sequence. Now I want to show that it has a convergent subsequence that converges to $b\in B$ and then I want to do the same for $A$. And then finally to show that $d(a,b)=m$ in fact. Any clues to how to get there?