Compactness and product topology STATEMENT: Let $X$ and $Y$ be topological spaces, let $A$ be a compact subset of $X$, and let $B$ be a
compact subset of $Y$ . Let $O$ be a subset of $X \times Y$that is open for the product topology.
Prove that if $A \times B \subset O$ then $\exists$ an open subset $U$ of $X$ and an open subset $V$ of
$Y$ such that $A \subset U$ and $B \subset V$ and $U \times V \subset O$. (Hint: consider first the case in which A
contains only one point.)
QUESTION: I don't really know how to parse this question in my mind right now. I don't know how to proceed even with the given hint. Could someone offer me another suggestion or hint to get me moving in the right direction.
Lemma 1
PROOF:We prove the case when $A$ contains only one element, $a$. Then for each $b\in B$ we can find two open sets $A_{(a,b)}\subseteq X$ and $B_b\subseteq Y$ such that $A_{(a,b)}\times B_b\subseteq \mathcal{O}$ contains the point $(a,b)$. Therefore, we have $\left\{a\right\}\subseteq\underset{b\in B}{\bigcup}A_{(a,b)}$ and $B\subseteq \underset{b\in\mathcal B}{\bigcup}B_b$. Since $A$ and $B$ are compact we have a finite subcollection $B_{b_1},...,B_{b_m}$ that covers $B$, and another finite subcollection $A_{(a,b_1)},...,A_{(a,b_m)}$ that covers the set $\left\{a\right\}$ since $\left\{a\right\}\subseteq A_{(a,b_i)}$ for all $i=1,2,...M$. If we let $U_a=A_{(a,b_1)}\cap...\cap A_{(a,b_m)}$ and $V_a=B_{b_1}\cup...\cup B_{b_m}$ then $U_a$ and $V_a$ are both open sets in $X$ and $Y$, respectively, since they are the finite union and intersection of open sets, in $X$ and $Y$. And $\left\{a\right\}\times B\subseteq U_a\times V_a\subseteq \mathcal{O}$ since $a\in A_{(a,b_i)}$ for all $i=1,2,...,m$. 
Original Statement
PROOF:Using lemma 1 we let  $U'=\left\{U_a\right\}_{a\in A}$ and $V'=\left\{V_a\right\}_{a\in A}$. We see that $U'$ covers $A$, and because A is compact there is a finite subcollection $U_{a_1},...,U_{a_n}$ of $U'$ that covers A. And likewise a finite subcollection $V_{a_1},...,V_{a_n}$ of $V'$ that covers B. We let $U= U_{a_1}\cup...\cup U_{a_n}$ and $V_{a_1}\cap...\cap V_{a_n}$. Since $B\subseteq V_{a_i}$ for all $i=1,2,...,n$, we know that $B\subseteq V$. Furthermore, $U$ and $V$ are open sets in $X$ and $Y$, respectively, because $U$ and $V$ are the finite union and intersection of open sets in $X$ and $Y$, respectively.  Thus, $A\times B\subseteq U\times V\subseteq\mathcal{O}$ where $U$ and $V$ are open sets in $X$ and $Y$, respectively. 
 A: Let’s start with the hint that you were given, but take it even further: suppose that $A=\{x\}$ and $B=\{y\}$, so that $A\times B$ is just the one-point set $\{\langle x,y\rangle\}$. In this very special case it’s easy to find open sets $U$ and $V$ that work: $\langle x,y\rangle\in O$, and $O$ is open in the product topology on $X\times Y$, so by definition there are an open $U\subseteq X$ and an open $V\subseteq Y$ such that $\langle x,y\rangle\in U\times V\subseteq O$.
Now try the hint: let $A=\{x\}$ still, but let $B$ be any compact subset of $Y$. Do what we just did above for each point $y\in B$. That is, for each $y\in B$ there are an open $U_y\subseteq X$ and an open $V_y\subseteq Y$ such that $\langle x,y\rangle\in U_y\times V_y\subseteq O$. Notice that for each $y\in B$ we have $y\in V_y$, so $\{V_y:y\in B\}$ is an open cover of $B$ in $Y$. Now use the fact that $B$ is compact: there is a finite subset $F$ of $B$ such that $\{V_y:y\in F\}$ covers $B$. Let $U=\bigcap_{y\in F}U_y$ and $V=\bigcup_{y\in F}V_y$; $V$ is a union of open sets in $Y$, so of course it’s an open set in $Y$, and $U$ is the intersection of only finitely many open sets in $X$, so it’s an open set in $X$. Can you show that $$A\times B=\{x\}\times B\subseteq U\times V\subseteq O\;,$$ which is what you want? Here’s a sketch that may help; the blue rectangle is $U_y\times V_y$.

Notice how I used the compactness of $B$ combined with the simple result of the first paragraph to get the result for singleton $A$ and arbitrary compact $B$. To get the full result, you want to use the compactness of $A$ together with the result of the second paragraph in a very similar fashion.
