Let ${ K, F \subseteq \mathbb{R} ^n . }$ Let ${ K }$ be compact, and ${ F }$ be closed.
Q) Do there exist ${ a \in K, }$ ${ b \in F , }$ such that
$${ d(a, b) = d(K, F) . }$$
It turns out yes.
Consider
$${ d(K, F) = \inf \lbrace d(x, y) : x \in K, y \in F \rbrace . }$$
Note that there exist sequences
$${ {\begin{aligned} &\, (x _n) \subseteq K, \quad (y _n) \subseteq F, \\ &\, d(x _n, y _n) \to d(K, F) . \end{aligned}} }$$
Note that ${ K }$ is sequentially compact.
Hence by passing to a subsequence, we can assume
$${ {\begin{aligned} &\, (x _n) \subseteq K, \quad (y _n) \subseteq F, \\ &\, d(x _n, y _n) \to d(K, F), \\ &\, d(x _n, x ^{\ast}) \to 0, \, \, x ^{\ast} \in K . \end{aligned}} }$$
Q) Does ${ (y _n) }$ also have a convergent subsequence?
Note that
$${ d(y _n, x ^{\ast}) \leq \underbrace{d(y _n , x _n)} _{< d(K, F) + 1} + \underbrace{d(x _n, x ^{\ast})} _{< 1} }$$
for all but finitely many ${ n . }$
Hence
$${ d(y _n, x ^{\ast}) \leq d(K, F) + 2 }$$
for all but finitely many ${ n . }$
Hence ${ (y _n) }$ is a bounded sequence in ${ \mathbb{R} ^n . }$
Hence ${ (y _n) }$ has a convergent subsequence, as needed. ${ \blacksquare }$
Note that ${ (y _n) }$ has a subsequential limit ${ y ^{\ast} . }$
Note that ${ F }$ is closed, hence ${ y ^{\ast} \in F . }$
Hence by passing to a subsequence, we can assume
$${ {\begin{aligned} &\, (x _n) \subseteq K, \quad (y _n) \subseteq F, \\ &\, d(x _n, y _n) \to d(K, F), \\ &\, d(x _n, x ^{\ast}) \to 0, \, \, x ^{\ast} \in K , \\ &\, d(y _n , y ^{\ast}) \to 0, \, \, y ^{\ast} \in F . \end{aligned}} }$$
Q) Is ${ d(x ^{\ast}, y ^{\ast}) = d(K, F) }$?
Equivalently,
Q) Is ${ d(x _n, y _n) \to d(x ^{\ast} , y ^{\ast}) }$?
Note that
$${ - d(x _n, x ^{\ast}) - d(y _n, y ^{\ast}) \leq d(x ^{\ast}, y ^{\ast}) - d(x _n, y _n) \leq d(x _n, x ^{\ast}) + d(y _n, y ^{\ast}) . }$$
Hence
$${ {\begin{aligned} &\, \vert d(x ^{\ast}, y ^{\ast}) - d(x _n, y _n) \vert \\ \leq &\, d(x _n, x ^{\ast}) + d(y _n, y ^{\ast}) \to 0 . \end{aligned}} }$$
Hence
$${ d(x _n, y _n) \to d(x ^{\ast}, y ^{\ast}) }$$
as needed. ${ \blacksquare }$
Hence
$${ d(x ^{\ast}, y ^{\ast}) = d(K, F) }$$
as needed. ${ \blacksquare }$