(Analysis 1 by Tao) Exercise 8.1.8 Use Corollary 8.1.13 to prove Corollary 8.1.14.
Corollary 8.1.13. The set $\mathbb{N} \times \mathbb{N}$ is countable.
Corollary 8.1.14. If $X$ and $Y$ are countable, then $X \times Y$ is countable.
For the proof of Corollary 8.1.13, the book shows that $\mathbb{N} \times \mathbb{N} = A \cup B$, where $A = \{(n,m) \in \mathbb{N} \times \mathbb{N} : 0 \le m \le n\}$ and $B = \{(m,n) \in \mathbb{N} \times \mathbb{N} : 0 \le n \le m\}$.
I also know that $X$ and $Y$ are countable, there exists bijections from $\mathbb{N}$ to $X$ and $\mathbb{N} $ to $Y$. To finish the proof, I need to find the bijection from $\mathbb{N} \times \mathbb{N}$ to $X \times Y$, but I do not know how to get this.
Any help would be appreciated.