Suppose $X$ is a compact Hausdorff topological space, $C\subseteq X$ a closed subset and $x\notin C$ a point. I have to prove that there exists a compact neighborhood of $x$ which is disjoint from $C$.
Here's what I did: since $X$ is Hausdorff, for every $y\in C$ we have two disjoint neighbourhoods of $y$ and $x$, respectively, say $U_y$ and $V_y$. In this way we get an open covering of $C$: $ C\subseteq\bigcup_{y \in C}U_y $ and by compactness, we can find $y_1,\ldots,y_n$ such that $ C\subseteq\bigcup_{i=1}^n U_{y_i}. $
At the same time, we note that $B=\bigcap_{i=1}^n V_{y_i}$ is a open neighbourhood of $x$ and it's disjoint from $\bigcup_{i=1}^n U_{y_i}$. I would like to finish the proof saying that the closure of $B$ is compact (since closed in compact is compact) and we are through, but I should justify why the closure should still be disjoint from $C$. Could you help me with that? Thanks.