Suppose that $A \subset X$ and $B \subset Y$ where $X$ and $Y$ are nonempty topological spaces, and assume that $A \times B$ is a nonempty open subset of $X \times Y$.
Prove that $A$ is open in $X$ and $B$ is open in $Y$.
(Hint: Take intersection with $\{x_0\} \times Y$ and $X \times \{y_0\}$ where $(x_0, y_0) \in A \times B$ and the vertical and horizontal slices are homeorphic to the factors $X$ and $Y$.)
This is where I'm stuck. How do I use the assumption that $A \times B$ is an open subset of $X \times Y$ and use the hint to prove that $A$ and $B$ are open in $X$ and $Y$ respectively?
You could use that the projection map $\pi:X \times Y \to X$ is an open map. That means that the image of an open set via that projection is an open set of $X$. In particular, $A$ is an open set of $X$. The same can be done for $B$.