The question is,
"Let $X$ be a metric space, prove the following: any point and a disjoint closed set in $X$ can be separated by open sets, in the following sense that if $x$ is a point and $F$ is a closed set which does not contain $x$, then there exists a disjoint pair of open sets $G_1$ and $G_2$ such that $F \subseteq G_1$ and $x \in G_2$."
My proof is:
Let $r = \text{inf} \{d(x,f): f \in F\}$. Then let $G_1 = S_{r/3}(x)$ and let $G_2 = \bigcup_{f \in F} S_{r/3}(f)$.
$G_1 \cap G_2 = \emptyset $ because they were constructed have a distance or $r/3$ between them.
I'm not sure exactly how to formalize this idea though.
Also, do I need to show that $G_1$ and $G_2$ are open?
If I do, is it sufficient to say, for each point $\alpha \in S_{r/3}(x)$, let $r' = r/3 - d(x,\alpha)$, then there exists an open sphere, $S_{r'}(\alpha) \subseteq S_{r/3}(x)$, so $G_1$ is open? Then can I just apply the same argument for each point in $F$ then say that because $G_2$ is the union of arbitrary open sets it is open?
Thanks for your help.
First, note that $d(x,F) = \inf \{d(x,y): y \in F\} >0$ because $d(x,F) = 0$ iff $x \in \overline{F}$ for any $F \subseteq X$. Here $F = \overline{F}$ and $x \notin F$.
So define $r=d(x,F) > 0$.
Note that $B(x,\frac{r}{3}) \cap B(y, \frac{r}{3}) = \emptyset$ for any $y \in F$: suppose not, then we have $z \in B(x,\frac{r}{3}) \cap B(y, \frac{r}{3})$ and then
$d(x,y) \le d(x,z) + d(z,y) < \frac{r}{3} + \frac{r}{3} < r$, which would imply that $r=d(x,F) \le d(x,y) < r$, contradiction.
Then $O = \bigcup \{B(y,\frac{r}{3}): y \in F\}$ is open as a union of (open) balls, and by the previous $$B(x,\frac{r}{3}) \cap O = B(x,\frac{r}{3}) \cap \bigcup \{B(y,\frac{r}{3}): y \in F\} = \bigcup \{ B(x,\frac{r}{3} \cap B(y, \frac{r}{3}): y \in F\} = \emptyset$$ so we have separated $x$ and $F$ by disjoint open sets.