TITLE: Compact and open subspaces using products
QUESTION [6 upvotes]: I'm preparing for a topology prelim, and there's one question related to compactness that I'm trying to work on. Here it is:  
Let $C$ be a compact subspace of $X$, and $K$ be a compact subspace of $Y$. Now let $U$ be an open set in $X \times Y$ that contains $C \times K$. Show that there exist open subspaces $V$ of $X$ and $W$ of $Y$ such that $$C \times K \subset V \times W \subset U.$$ 
Well, certainly $C \times K$ is a compact subspace of $X \times Y$, right? Then this would mean that every covering of $C \times K$ by open sets in $X \times Y$ contains a finite subcollection covering $C \times K$. Can't you use $U$ as the open covering, and then somehow get a finite subcollection which might have something to do with the space $V \times W$? What am I missing here? I would appreciate some helpful input, thanks.
My second attempt:
Alright, I might as well let $U = A \times B$, $A,B$ open such that $C \subset A, K \subset  B$. Now we could let $\mathcal{C}$ be an open covering of $C$; since $C$ is compact, there is a finite subcollection $\{V_1, V_2, … ,V_n\}$ of $\mathcal{C}$ covering $C$. Next, let $V= A \cap (\bigcup_{i=1}^n V_i)$. Then, $V \subset A$, $V$ open and $C \subset V$. Similarly, we can find $W$ such that $W \subset B$, $W$ open and $K \subset W$ so that $$C \times K \subset V \times W \subset A \times B= U.$$ 
I hope this was the right approach to take.

REPLY [3 votes]: Let $C$ and $K$ be compact subsets of $X$ and $Y$ respectively, and $U$ an open set in $X\times Y$ s.t. $C\times K\subset U$. Here's how you can find those $V$ and $W$:
Fix $y\in K$. Now for each $x\in C$ we have $(x,y)\in U$, so there exists basis elements of the product topology $B_{x}\times G_{x}\subset U$ so that $x\in B_{x}$ and $y\in G_{x}$. Since $C$ is compact and $C\subset \bigcup_{x\in C}B_{x}$, there exists a finite $I\subset C$ so that $C\subset \bigcup_{x\in I}B_{x}$. Denote $V_{y}=\bigcup_{x\in I}B_{x}$ and $W_{y}=\bigcap_{x\in I}G_{x}$. Now $C\subset V_{y}$ and $y\in W_{y}$, where $V_{y}\subset X$ and $W_{y}\subset Y$ are open sets with $V_{y}\times W_{y}\subset U$. This could be done for each $y\in K$. Since $K$ is compact and $K\subset \bigcup_{y\in K}W_{y}$, there exists a finite $J\subset K$ so that $K\subset\bigcup_{y\in J}W_{y}$. Denote $V=\bigcap_{y\in J}V_{y}$ and $W=\bigcup_{y\in J}W_{y}$. Now $C\subset V$ and $K\subset W$, where $V\subset X$ and $W\subset Y$ are open sets with $V\times W\subset U$.