Prove the uniqueness of function $X \rightarrow A \times B$ Let A and B be sets and consider their Cartesian product $A\times B\rightarrow A$.
Give surjective functions $\pi_A:A\times B\rightarrow A$ and $\pi_B:A\times B\rightarrow 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$?
 A: The conjecture you are trying to prove is false
With the conditions you have specified, there is no guarantee that a solution $g$ will exist, and even if it exists, it need not be unique (i.e., you are trying to prove a false conjecture).  You can easily demonstrate this by constructing a counter-example to the asserted conjecture ---i.e., a specification of the functions $\pi_A, \pi_B, f_A, f_B$ where either there is no solution $g$ or where there is a non-unique solution $g$.
To see this, let's first look at the requirements on a solution $g$.  For all $x \in X$ you have $g(x) \in A \times B$, so you are effectively looking for any function $g$ that satisfies:
$$f_A(x) = \pi_A (g(x)) \quad \quad \quad \text{for all } x \in X, \\[6pt]
 f_B(x) = \pi_B (g(x)) \quad \quad \quad \text{for all } x \in X.$$
Since $\pi_A$ and $\pi_B$ are surjective, this means that there is at least one value for the argument of either function that will yield the desired outputs $f_A(x)$ or $f_B(x)$ respectively.  This guarantees that you can choose $g$ to get the required output for either one of the above equations, but it does not guarantee that you can satisfy both equations simultaneously, nor does it guarantee that $g$ would be unique even if you can.

Example of non-existence of solution: Let $A = B = X = \{ 0,1 \}$ and let $f_A = f_B$.  Then choose surjective functions:
$$\pi_A(a,b) = \mathbb{I}(a=b) \quad \quad \quad \pi_B(a,b) = \mathbb{I}(a \neq b).$$
Now choose any function $g = (g_a,g_b)$ satisfying the first required equation $f_A(x) = \pi_A (g(x))$.  Then:
$$\begin{equation} \begin{aligned}
f_A(x) = \pi_A (g(x)) 
&= \mathbb{I}(g_a(x) = g_b(x)) \\[6pt]
&= 1 - \mathbb{I}(g_a(x) \neq g_b(x)) \\[6pt]
&= 1 - \pi_B (g(x)) \\[6pt]
&= 1 - f_B(x) \\[6pt]
&\neq f_B(x), \\[6pt]
\end{aligned} \end{equation}$$
which contradicts the specification that $f_A = f_B$.  Thus, in this particular specification of the functions $\pi_A, \pi_B, f_A, f_B$ there is no solution $g$.  This contradicts the conjecture.

Example of non-uniqueness of solution: Let $A = B = X = \{ 0,1 \}$ and let $f_A(x) = 1$ and $f_B(x) = 0$ for $x=0,1$.  Then choose surjective functions:
$$\pi_A(a,b) = \mathbb{I}(a=b) \quad \quad \quad \pi_B(a,b) = \mathbb{I}(a \neq b).$$
For $g(x) \equiv (x,x)$ we have:
$$\begin{equation} \begin{aligned}
\pi_A (g(x)) = \pi_A (x,x)
= \mathbb{I}(x=x) 
= 1 = f_A(x). \\[6pt]
\pi_B (g(x)) = \pi_B (x,x)
= \mathbb{I}(x \neq x) 
= 0 = f_B(x). \\[6pt]
\end{aligned} \end{equation}$$
For $g'(x) \equiv (1-x,1-x)$ we have:
$$\begin{equation} \begin{aligned}
\pi_A (g'(x)) = \pi_A (1-x,1-x)
= \mathbb{I}(1-x=1-x) 
= 1 = f_A(x). \\[6pt]
\pi_B (g(x)) = \pi_B (1-x,1-x)
= \mathbb{I}(1-x \neq 1-x) 
= 0 = f_B(x). \\[6pt]
\end{aligned} \end{equation}$$
This shows that the functions $g$ and $g'$ are both solutions to the problem.  This gives us a non-unique solution for the function $g$, which contradicts the conjecture.
A: Assuming that $\pi_A$ and $\pi_B$ are indeed the usual projections maps, you have a very explicit definition of all the objects : 
$A\times B = \{ (a,b), a\in A, b\in B \}$ and the projections are given by $\pi_A(a,b) = a$ and $\pi_B(a,b) = b$. Now take two functions $f_A : X \to A$ and $f_B : X\to B$.
Using these expression you should be ablo to carry the computations, to show that $g$ exists and is unique. 
