Question concerning isomorphism between two direct product of a pair of sets. For the following question: prove that any two direct products of a pair of sets A and B are isomorphic. 
The text where this question comes from gives the following definitions and a theorem which the proof was presented in text:

Given two sets $A$ and $B$, we defined their cartesian products as: $A \times B := \{(x,y)\mid x\in A,  y\in B\}$.
We define their corresponding projection maps on sets $A$ and $B$ respectively as: 
$\pi_{A}: A\times B \rightarrow A; (x,y) \mapsto x)$ and 
$\pi_{B}: A\times B \rightarrow B; (x,y) \mapsto y)$


Theorem 1: Given any set $C$ and maps $f:C\rightarrow A$, $g:C\rightarrow B$, there is a unique map $(f,g):C\rightarrow A\times B$ such that $(f,g)\pi_{A}=f$ and $(f,g)\pi_{B}=g$.


Definition:  The $\textit{direct product } A\times B$ of two sets $A$ and $B$ is a set $A\times B$ equipped with maps $\pi_{A}: A\times B \rightarrow A$ and $\pi_{B}: A\times B \rightarrow B$ such that, for any set $C$ and set maps $f:C\rightarrow A$, $g:C\rightarrow B$, there is a unique map $(f,g):C\rightarrow A\times B$ such that $(f,g)\pi_{A}=f$ and $(f,g)\pi_{B}=g$.

I am confused about the wording of the question.  Is the question asking the following:  Given sets $M$, $N$, $E$ and $F$, the two cartesian products respectively $A= M \times N$ and $B=E\times F$ We define the function $h:A\rightarrow B$  and the corresponding pairs of projection maps associated with the product set $A$ and the product set $B$ such that
$\pi_{M}: M\times N \rightarrow M$
$\pi_{N}: M\times N \rightarrow N$
$\pi_{E}: E\times F \rightarrow E$
$\pi_{F}: E\times F \rightarrow F$
Show that the function $h$ is an isomorphism.  I am suppose to define direct product for sets $A$ and sets $B$.  I am not sure how to do that properly and also, do I have to show that the function $h$ is homomorphic,  The text at this point have not defined what homomorphism suppose to look like for direct product of sets.  I am really having trouble rephrasing the question in more formal math notations.  Thank you in advance
 A: The notion 'direct product' is a generalization of the Cartesian product of sets, motivated by Theorem 1. The notation $A\times B$ for this generalized version is also motivated by this, but it doesn't a priori mean the Cartesian product in this context.
The advantage of this generalization is not clearly seen in this context, but observe that the pictural definition of direct product only involves dots (as sets), arrows (as functions) and composition of arrows.
Such a framework is called 'category', and it's very general: for instance instead of sets we can take some algebraic structures like groups, vector spaces or rings as dots and take homomorphisms as arrows.
Other categories contain continuous functions as arrows.
The definition of direct product makes perfect sense in each case, and by the way, in most such category the underlying set of the direct product can be taken as the Cartesian product of the underlying sets.
For a more abstract example, if the dots denote positive integers and there's one arrow $a\to b$ iff $a$ is a divisor of $b$, then in this category, the 'direct product' of numbers (dots) $a,b$ is just their greatest common divisor.
(So, actually, the 'direct product' is a common generalization of the $\gcd$ of numbers and the Cartesian product of sets/structures.)

About the exercise, what you need to prove is that Theorem 1. characterizes the Cartesian product. In order to not getting confused, just replace the disturbing notation $A\times B$ with arbitrary letters, unless we're really talking about the Cartesian product.
Let sets $A,B$ be given and suppose that a set $P$ with maps $p_1:P\to A,\ p_2:P\to B$ satisfies the definition of direct product.
Then actually we can apply Theorem 1., so we obtain the unique map $u:P\to A\times B$
$$u(x)=(p_1(x),\,p_2(x))$$
that makes $\pi_A\circ u=p_1$ and $\pi_B\circ u=p_2$.
For the inverse of $u$, apply the hypothesis on $P,p_1,p_2$ with $C=A\times B$ and $f=\pi_A,\,g=\pi_B$, so we obtain (a unique) $v:A\times B\to P$ that makes $p_1\circ v=\pi_A$ and $p_2\circ v=\pi_B$.
Now, by these compositions, we get
$$p_1\circ v\circ u=\pi_A\circ u=p_1=p_1\circ{\rm id}_P\\
p_2\circ v\circ u=\pi_B\circ u=p_2=p_2\circ{\rm id}_P$$
thus, by the uniqueness condition we must have $v\circ u={\rm id}_P$, and similarly $u\circ v={\rm id}_{A\times B}$.
It means that $u,v$ are inverses of each other and define a bijection between $P$ and $A\times B$.
Now, if also $Q,q_1,q_2$ satisfies the definition of direct product, then we receive another bijection $w,w^{-1}$ between $Q$ and $A\times B$, and composing these with $u$ or $v$ gives a bijection between $P$ and $Q$.
A: I believe what you're being asked to prove is: if you have two sets $S$ and $T$, and both of them satisfy the definition of the direct product (the maps $\pi_A$ and $\pi_B$ and the uniqueness property with respect to other sets $C$), then $S$ and $T$ are isomorphic.
(Hint for the proof: use the uniqueness property for $S$ with $C$ chosen to be $T$, and vice versa.)
This fact, that any two such sets are isomorphic, is what justifies naming such a set "the" direct product of $A$ and $B$ and giving it a name $A\times B$.
