I am self studying basic topology and have trouble proving the following question.
If $A$ and $B$ are compact, and if $W$ is a neighborhood of $A \times B$ in $X \times Y$, find a neighborhood $U$ of $A$ in $X$ and a neighborhood $V$ of $B$ in $Y$ such that $U \times V \subseteq W$.
Intuitively, in Euclidean space, I can see that such $U$ and $V$ must exist since one can trace around the "edge" of the compact space $A \times B$ and create an open product space that is only a little bit "larger" than $A \times B$ but smaller than $W$. Then the projection $U$ and $V$ would satisfy the requirement. But I could not think of a way to construct it formally. Any hint would be greatly appreciated!