Let $(X,d)$ be a metric space and $K \subset X$ a compact subset. We define $$\text{dist}_K(x) := \inf_{y \in K} d(x,y).$$ Show that
for every $x \in X \setminus K$ there exists disjoint open subsets $U,V \subset X$ so that $x \in U$ and $K \subset V$. Note: I know this is very similar to this question and this one but here, I have a different metric.
$\text{dist}_K(x) = 0 \iff x \in K$.
My Proof
Let $x \in X \setminus K$. Then we have $\text{dist}_K(x) > 0$ and therefore $U := B\left(x, \frac{1}{2}\text{dist}_K(x)\right) \subset X$ (which is the open ball centered around $x$ with radius $ \frac{1}{2}\text{dist}_K(x)$) which is an open subset containing $x$. Now, define $V := \bigcup_{k \in K} B\left(k, \frac{1}{2}\text{dist}_K(x)\right)$ which is open in $X$ as union of sets which are open in $X$. Now, to show $\tilde{U} := U \cap V = \emptyset$, we assume there exists an $u \in \tilde{U}$ and seek a contradiction. By definition we have \begin{equation} d(u,x) < \text{dist}_K(x) \quad \forall x \in X \setminus K \qquad \text{and} \qquad d(u,k) < \text{dist}_K(x) \quad \forall k \in K \end{equation} Adding both equations, for all $x \in X \setminus K$ and all $k \in K$ we have \begin{equation} \inf_{y \in K} d(x,y) > d(x,u) + d(u,k) \overset{\triangle \neq}{\ge} d(x,k), \end{equation} which is a contradiction.
"$\implies$": If $\text{dist}_K(x) = 0$ we have $I := \inf_{y \in K} d(x,y) = 0$ By the definition of the infimum there exists a sequence $(x_n)_{n \in \mathbb{N}} \subset K$ with $\lim_{n \to \infty} x_n = x$. But since $K$ is compact it's also closed and therefore we know that $x \in K$.
"$\impliedby$": If $x \in K$, we have \begin{equation} \text{dist}_K(x) = \inf_{y \in K} d(x,y) = d(x,x) = 0, \end{equation} because $d$ is a norm and therefore positive definite on $X$.
Your proof of $1$ isn't correct because until you prove $2$, you don't know that $d(x, K) \gt 0$.
In any event, but I'd simplify and generalize the proof so that it works in any Hausdorff space.
For each $y \in K~ \exists U_y, V_y~(y \in U_y, x \in V_y, U_y \cap V_y = \emptyset)$. The $U_y$ are an open cover of $K$ so choose finitely many of them that cover $K$, $U_{y_1}, \ldots, U_{y_n}.$ Then $V= \bigcap_{k=1}^n V_{y_k}$ is a finite intersection of open sets, so it's open, and by construction $V \cap U_{y_k} = \emptyset$ for all $k$, so let $U= \bigcup_{k=1}^n U_{y_k}.$ Then $x \in V, U \cap V = \emptyset$ and $K \subseteq U.$
Edited to correct comment on proof in original post.