I would like to prove the following statement.
Let A and B be nonempty disjoint subsets of $\mathbb{R}$ where A is closed and B is compact. Then there exists $a \in A$ and $b \in B$ such that $inf${$|a-b|$:$a \in A, b \in B$}=$|a-b|$
A and B disjoint, A compact, and B closed implies there is positive distance between both sets
I read a similar question above where the concept of "limit point" and others were used, but my class (Introduction to Analysis) has not gone that far; most of all, I would like to prove the statement from the knowledge that the class covered.
So far, I have learned definition of limit of a sequence, Bolzano-Weierstrass Theorem. Also, I just learned (and proved) that there exists a sequence ${a_n}$ in E such that $\lim{a_n} = \inf{E}$ if E is a nonempty subset of $\mathbb{R}$ (whether E is bounded below or not due to the extended real numbers).
From the things that I learned, first, I constructed a set $E$={$|a-b|$:$a\in{A}, b\in{B}$} and I know that there exists a sequence ${x_{n}}$ in E such that $\lim{x_{n}}=infE$. Since ${x_{n}} \in{E}, x_{n}=a_{n}-b_{n}$ where $a_{n} \in A, b_{n} \in B$. Let $infE = \beta$. Then, this leads to $\lim{(a_{n}-b_{n})}=\beta$. Then, for any $\epsilon$>0, there exists $N \in$ $\mathbb{N}$ such that $|a_{n}-b_{n}-\beta|<\epsilon$ for all n $\ge$ N.
Then, I could not proceed. I should use conditions that A and B are disjoint, A is closed, and B is compact. Could anyone help me proceed? I had a feeling that using contradiction might work from the link above, but it is quite tough. Since I am a novice (just started taking Introduction to Analysis), I would very much appreciate it if you could help me prove this at the beginner level.