A totally disconnected compact space has clopen(closed-open) sets

compactnessgeneral-topology

I'm trying to solve this problem, featured in an entrance examination held in 2018.

Let $X$ be a compact topological space. Suppose that for any $x,y\in X$ with $x\neq y,$ there exist open sets $U_x$ and $U_y$ containing $x$ and $y,$ respectively, such that \begin{align}U_x \cup U_y &=X &\text{ and,}\\ U_x\cap U_y&=\emptyset &\dots (*)
\end{align}
Let $V\subseteq X$ be an open set. Let $x\in V.$ Show that there exists a set $U$ which is both open and closed and $x\in U\subseteq V$.

The condition being $(*).$ My idea is that this $(*)$ condition gives us that $X$ is a totally disconnected space (Please tell me if I'm wrong). Now, let $U$ be a subset of $V$ containing $x.$

From here, I can only think of two approaches, one is using the result that if the boundary of the set is empty then the set itself is both open and closed. The other considering two cases one where $U$ is not open and the other where $U$ is not closed and showing contradictions in each case. Although I don't have my solution yet, but I'm failing to put the compactness of $X$ into the picture.

I might be completely wrong.

Regards.

Best Answer

For all $y$ not in $V$ $\exists$ clopen $V_y$ with $x\notin V_y$ and $y\in V_y.$
$V\cup \{ V_y : y \text{ not in } V \}$ covers $X.$
Let, $W$ be a finite subset of $\{ V_y : y\text{ not in } V \}$ so $V \cup W$ covers X.
$x$ in clopen $A = \cap \{ X\setminus U : U \subset W \}.$
$A \subseteq V.$
Otherwise $\exists z \in A$ with $z$ not in $V.$
$\exists U \subseteq W$ with $z \in U$ which contradicts $z \in A.$