Suppose $A,B$ are closed subsets of a metric space $(X,d)$. I am trying to show that there exist disjoint open sets $U,V$ such that $U$ contains $A$ and $V$ contains $B$.
I managed to find an open set $U$ that contains $A$ as follows:
Recall that $x\in \bar{A} \iff $ for all $r>0$, $B(x,r)$ contains a point of $A$.
So for each $x \in A(= \bar{A}) \Rightarrow x\notin B(=\bar{B})$ which means that there exists $r>0$ such that $B(x,r)$ contains no point of $B$. So we can can take the union of these open balls (which gives an open set) that contains $A$. So I have managed to find $U$.
However how can I now find $V$? The problem is that the distance between one of the open balls in the union and $B$ might be $0$, which means that we might run into trouble. Is it possible to find a suitable $V$ using this method?