How to prove that $Y$ is in bijection with $A\times B$ given information presented in part (a) and (b) in this question?
Question 6
Let $A$ and $B$ be sets and consider their Cartesian product $A\times B$.
(a) Give surjective functions $\pi_A:A\times B\rightarrow A$ and $\pi_B:A\times B\rightarrow B$.
(b) Suppose we are given a set $X$ and functions $f_A:X\rightarrow A$ and $f_B:X\rightarrow B$. How do we prove that there is a unique function $g:X\rightarrow A \times B$ such that $f_A=\pi_A\circ g$ and $f_B=\pi_B\circ g$?
(c) Let $Y$ be another set satisfying the same properties that we proved in (a) and (b) for $A\times B$. Prove that $Y$ is in bijection with $A\times B$.
You do have to assume throughout that $A$ and $B$ are both non-empty.
a) is easy: $\pi_A(a,b)=a$, $\pi_B(a,b)=b$ for all $(a,b) \in A \times B$. Now, if $A \neq \emptyset$ we can show that $\pi_B$ is a surjection and if $B \neq \emptyset$ we can show that $\pi_A$ is a bijection.
b) is also easy given these $\pi_A,\pi_B$: from given $f_A: X \to A$ and $f_B:X \to B$ we define $g(x)=f_A \times f_B =(f_A(x), f_B(x))\in A \times B$ and the compositions trivially hold and $g$ is clearly unique: suppose $g(x)=(a',b') \in A \times B$ obeying the compositions. Then $a'=\pi_A(g(x))=(pi_A \circ g)(x)=f_A(x)$ and likewise $b'=g_B(x)$, so we have no choice but to define $g$ this way.
As to c): if $Y$ with $\pi'_A: Y \to A$ and $\pi'_B: Y \to B$ obey the same properties, apply them to $f_A=\pi_A: A \times B \to A$ and $f_B=\pi_B: A \times B \to B$. This gives us a unique $g: A \times B \to Y$ with $\pi'_A \circ g= \pi_A$ and $\pi'_B \circ g = \pi_B$. But it's easy to check that $g'=\pi'_A \times \pi'_B$ also satisfies the compositions and by unicity $g=\pi'_A \times \pi'_B$...