$A, B \subset X$ compact, disjoint subsets of a Hausdorff space. Show existence of disjoint empty sets 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
 A: 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$?
A: Your intuition is good in a metric space, but, like you say, we don't have the luxury of a metric space. The point of your using the metric was to ensure that two balls in an open cover don't get too close, but we only care that they don't overlap. So as @CandyOwl suggests, we can use the Hausdorff property to accomplish this instead (you should know to try this because it's the only thing the problem gives us to work with!): we could cover both $A$ and $B$ by 


*

*picking pairs $(a,b) \in A \times B$

*taking disjoint neighborhoods $U_a$ and $U_b$ of $a$ and $b$, respectively ($U_a \cap U_b = \varnothing$)


and doing this for enough pairs so that every point of $A$ and every point of $B$ has been used (to ensure we have open covers of $A$ and $B$). These open covers reduce to finite subcovers by compactness. 
Are the finite open covers we've made disjoint? If not, can we modify them slightly so that they are?
