Let $(X,d)$ be a metric space, $C$ be a closed set in $X$. Define $$d(C, x) := \inf \{d(c, x): c\in C \}$$ for all $x \in X$. Fix a point $p \in X$. Show $U= \{x \in X: d(x, C)\leq d(p, C)\}$ is a closed set in X.
I started with $X= ∪{cl(B_{d(p,C)}(x):x∈C)}$, but I'm not sure if $∪{cl(B_{d(p,C)}(x):x∈C)}=cl(∪{B_{d(p,C)}(x):x∈C})$ or not.
If $f$ is a continuous function then $\{x\colon f(x) \le c\}$ is a closed set.
You need to prove that $x\mapsto d(x,C)$ is continuous... this is an easy task, actually you can prove that $$ \lvert d(x,C) - d(y,C)\rvert \le d(x,y). $$