the following post is the answer for Show that a locally compact Hausdorff space is regular. I was reading the answer,but not able get the highlighted argument. Please explain this...

Suppose $X$ is a Hausdorff space which is locally compact, meaning that every point has a compact neighborhood. Consider a closed set $F\subseteq X$ and a point $x\in X\setminus F.$ Let $K$ be a compact neighborhood of $x.$

Since $X$ is Hausdorff, and since $F\cap K$ is compact and $x\notin F\cap K,$ there are disjoint open sets $U,V$ such that $x\in U$ and $F\cap K\subseteq V.$

Now $x\in\operatorname{int}K$ (since $K$ is a neighborhood of $x$), and $K$ is closed (since $K$ is compact and $X$ is Hausdorff).

Thus we have disjoint open sets $U_0=U\cap\operatorname{int}K$ and $V_0=V\cup(X\setminus K)$ with $x\in U_0$ and $F\subseteq V_0.$


In any Hausdorff space $x \notin K$, $K$ compact implies there exist disjoint open sets $U,V$ with $x \in U, K \subseteq V$: For any $y \in K$ there exist disjoint open sets $U_y,V_y$ with $x \in U_x, y \in V_y$. $K$ is covered by a finite number of $V_x$'s say $K \subseteq \bigcup_{i=1}^{n} V_{x_i}$. Take $U=\bigcap_{i=1}^{n} U_{x_i}, V=\bigcup_{i=1}^{n} V_{x_i}$.


Lemma: if $X$ is a Hausdorff space and $x \in X$ and $K$ is a compact set that does not contain $x$, then $x$ and $K$ have disjoint open neighbourhoods.

The proof uses the Hausdorff property for all pairs $x,p \in K$ and use the resulting open cover of $K$ (which has a finite subcover by compactness) to construct these neighbourhoods.