Let $X$ and $Y$ be metric spaces, with $X$ compact, and $f: X \to Y$ continuous.
Let $C$ be a closed subset of $Y$.
Show that for any open neighboorhood $U$ of $f^{-1}(C)$ there is an open neighborhood $V$ of $C$ such that
$$
f^{-1}(V) \subset U.
$$
This question is answered here but I don't understand the answer.
Specifically, I don't see why
$$
U^c \cap f^{-1}(C) = \emptyset,
$$
with $U^c$ the complement of $U$ in $X$.
Here is my attempt.
Since $U$ is open and $f^{-1}(C)$ is closed then the $f^{-1}(C)$ complement of $U$ is closed. Let $U^c$ be this complement.
since $f$ is continuous, then $f(U^c)$ is closed.
Let $V=C\setminus f(U^c)$, then $V$ is open, but I don't see why
$$
f^{-1}(V) \subset U.
$$