Claim: Let X be a metric space. If A,B⊂X are disjoint, A is compact, and B is closed, then there is δ>0 so that α−β≥δ∀α∈A,β∈B.
Proof. Assume the contrary. Let αn∈A,βn∈B be chosen such that αn−βn→0 as n→∞.
Since A is compact, there exists a convergent subsequence of αn(n∈N), αnm(m∈N), which converges to α∈A.
We have
α−βnm≤α−αnm+αnm−βnm→0asm→∞.
Hence α is a limit point of B and since B is closed α∈B, contradiction.Is my proof correct? I feel as though I am missing something simple which would trivialize the proof.
Answer
For the sake of having an answer addressing your question:
Yes, your proof is perfectly okay and I don’t think you can get it any cheaper than you did it.
Let me expand a little on what you can do with these arguments (also providing details to gary’s answer). I’m not saying my proof at the end is better than yours in any way, I’m just showing a slightly alternative way of looking at it.
Define the distance between two nonempty subsets A,B⊂X to be d(A,B)=infa∈A,b∈Bd(a,b) and write d(x,B) if A={x}.
 If B⊂X is arbitrary and nonempty then x↦d(x,B) is 1Lipschitz continuous, that is d(x,B)−d(y,B)≤d(x,y) for all x,y∈X.
 We have d(x,B)=0 if and only if x∈¯B.
 If d(⋅,A)=d(⋅,B) then ¯A=¯B.

Choose b∈B such that d(x,b)≤d(x,B)+ε. Then the triangle inequality yields d(y,B)−d(x,B)≤d(y,b)−d(x,b)+ε≤d(y,x)+ε. By symmetry we get d(x,B)−d(y,B)≤d(x,y)+ε, and 1. follows because ε was arbitrary. Update: In this closely related answer I show that 1 is in fact the best Lipschitz constant as soon as B isn’t dense. Don’t miss Didier’s answer to the same thread which relies on a useful general fact which is as easy to prove and Zarrax’s answer providing a cleanedup argument of the one I’m giving here.

Choose bn∈B with d(x,bn)≤d(x,B)+1n=1n. Then d(x,bn)→0 and hence x∈¯B. Conversely, if bn→x then d(x,bn)→0 hence d(x,B)=0.

Immediate from 2.
Let me combine these facts: assume A is compact and B is closed. As d(⋅,B):X→[0,∞) is continuous by 1. above, we conclude from compactness of A that d(⋅,B) assumes its minimum when restricted to A (if you think about how one usually proves this, you’ll find your argument again!). Hence there is a∈A with the property that d(a′,B)≥d(a,B) for all a′∈A. But if d(a,B)=0 then a∈B by 2. above, since B=¯B. So either A and B are not disjoint or d(a′,B)≥d(a,B)>0. By choosing δ∈(0,d(a,B)), we get the claim again.
Finally, if you don’t assume that one among A and B is compact, then the result is false. There was the example A=N and B={n+1n}n∈N given in the comments, or, a bit more geometrically appealing to me, let A be the xaxis in R2 and B the graph of the function x↦1x, x≠0.
Attribution
Source : Link , Question Author : Benji , Answer Author : Troy Woo