Proof or give counterexample:
Let $(M,d)$ be a metric space, $A$ a closed and $B$ a compact subset with $A\cap B\neq\emptyset$. Then $$\inf \{d(a,b): a\in A\setminus B\land\ b\in B\setminus A \}>0.$$
For disjoint sets the proof is easy, but in this case I don't even know if it is true.