Problem:
Let $A, B \subset X$ be both compact, $X$ is a Hausdorff space, with $A \cap B = \emptyset $. Show that there exists open sets $U, V \subset X$ with $A \subset U, B \subset V$ and $U \cap V = \emptyset$
My idea
A space is compact if every cover has a finite sub-cover. So $A$ and $B$ both have this property. I was thinking that since $A$ and $B$ are disjoint, they are separated by some distance $\epsilon$ (although I am not sure I can talk about distances unless I am dealing with a metric space...) and then I could take open set enclosing $A$ and $B$ which can be constructed to be always $\epsilon/2$ distance from the other space. Not 100% if this is a good way to go...
Thanks in advance for your help
Fix an element $x\in A$; for every $y\in B$, consider an open neighborhood $U(x;y)$ of $x$ and an open neighborhood $V(x;y)$ of $y$ such that $U(x;y)\cap V(x;y)=\emptyset$. This is guaranteed by the fact $X$ is Hausdorff.
The set $\{V(x;y):y\in B\}$ is an open cover of $B$, so there exist $y_1,\dots,y_n$ such that $$ B\subseteq V(x)=V(x;y_1)\cup\dots\cup V(x;y_n) $$ Set $U(x)=U(x;y_1)\cap\dots\cap U(x;y_n)$. Then $V(x)\cap U(x)=\emptyset$. Note that $x$ is arbitrary, so we can perform this construction for every $x\in A$.
Since $\{U(x):x\in A\}$ is an open cover of $A$, we can find $x_1,\dots,x_n\in A$ such that $$ A\subseteq U=U(x_1)\cup\dots\cup U(x_n) $$ Define $$ V=V(x_1)\cap\dots\cap V(x_n) $$ Is $V$ open? Is $B\subseteq V$? Is $U$ open? Is $U\cap V=\emptyset$?