Product spaces and open sets I have a proposition I have been pondering that I need help with. 
Let $(X,d_{X})$ and $(Y,d_{Y})$ be metric spaces. Recall that the product space $(X\times Y, d_{1})$ is also a metric space with the metric $d_{1}: (X\times Y)\times(X\times Y) \to \mathbb{R}$ defined as
$$ d_{1}((x_{1},y_{1}),(x_{2},y_{2})) = d_{X}(x_{1},x_{2}) + d_{Y}(y_{1},y_{2}) $$
Show that (a) If $A, B$ are subsets of $X,Y$, respectively, and $A\times B$ is an open subset of $X\times Y$, then $A$ and $B$ are open in $X$ and $Y$, respectively.
My start:

Let $A \subset X$, $B \subset Y$, and let $A\times B$ be an open subset open in $X\times Y$. Since $A\times B$ is open, then $A\times B = \text{Int}(A\times B)$. 

I'm stuck in how to proceed. 
(b) If both $(X,d_{X})$ and $(Y,d_{Y})$ are separable, then $(X\times Y, d_{1})$ is also separable.

Suppose that both $(X,d_{X})$ and $(Y,d_{Y})$ are separable. Then, there exists some countable dense subset in each of $X$ and $Y$, say $A$ and $B$, respectively. We claim that $A \times B$ is a countable dense subset of $X\times Y$. To show that $A\times B$ is dense, let $C$ be an open set in $X\times Y$. 

Again, I am stuck in how to proceed. Any clues, tips, or insights?
 A: $A\times B$ is open implies for every $(a,b)\in A\times B$, there exists a ball $B((a,b),r)\subset A\times B, r>0$. $(x,y)\in B((a,b),r)$ i.e $d_X(x,a)+d_Y(y,b)<r$. Let $B(a,r)=\{x\in X:d_X(x,a)<r\}$, we have $B(a,r)\times b\subset B((a,b),r)\subset A\times B$. So $B(a,r)\subset A$ and $A$ is open. Same argument with $B$.
A: The open character of A and B can be deduced from the definition of open set. Let $a\in A$. Supposing $b\in B$^, $(a,b)\in A\times B$. As $A\times B$ is open, there exists $B((a,b),r)\subset A\times B$. Then if $a'\in B(a,r)$, $d_X(a,a')=d_X(a,a')+d_Y(b,b)=d_1((a,b),(a',b))<r$, so $(a,b)\in A\times B$, and thus $a'\in A$. That is, A is open. An analogous argument shows that B is open too.
Just to cover the trivial case, if B is empty then $A\times B$, and thus A, are empty too, and trivially open.
For the separable question, that X is separable implies that there exists a countable dense subset $C\subset X$, and similarly there is another dense countable set $D\subset Y$. Then $C\times D$ is countable and dense in $X\times Y$. To show the last bit, let $A\times B$ be a open subset of $X\times Y$. By the previous argument, A is open in X and B is open in Y. Thus, as C,D are dense there exists c,d such that $c\in A\cap C$ and $d\in B\cap D$. Thus $(c,d)\in C\times D \cap A\times B$, that is, $C\times D$ is dense. We conclude that $X\times Y$ is separable.
Edit: Not every open subset of $X\times Y$ is a cartesian product of two open sets as I assumed. However, let $E\subset X\times Y$ be open. Then $A =\{a:\exists(a,b)\in E\}\subset X$ and $B=\{b:\exists(a,b)\in E\}\subset Y$ are open by similar arguments, and the demonstration carries on exactly the same.
