Proof of the uniqueness of products. I am trying to understand the steps in this proof of the fact that products are unique.
$$\begin{array}{center}
           \;   A \times B  \\
           \; p_1 \swarrow \, \, \, \, \, \, \downarrow   f  \, \, \, \, \, \, \searrow p_2 \\
           \; A \longleftarrow \;   A \times' B  \longrightarrow B \\
\end{array}$$
By the universal property of products, there is a unique morphism $f$ such that the diagram above commutes.
Question 1: Can I use the universal property again in the diagram above to get a unique morphism $g: A \times'B \to A \times B$ such that the diagram commutes and hence they are isomorphic? I believe not, because the universal property only makes this diagram commutes:
$$\begin{array}{center}
           \;   A \times' B  \\
           \; p_1 \swarrow \, \, \, \, \, \, \downarrow   g  \, \, \, \, \, \, \searrow p_2 \\
           \; A \longleftarrow \;   A \times B  \longrightarrow B \\
\end{array}$$
and so my argument does not work.
The proof in the article then proceeds to "glue" the two together so that $g$ makes the entire "glued together" diagram commutes. That is, $p_1 \circ (g \circ f) = p_1$.
Question 2: Why does the universal property guarantee a $g$ such that $p_1 \circ (g \circ f) = p_1$? When can we join commutative diagrams together and then apply the universal property?
 A: Basically, you are trying to prove that for any two objects $A$ and $B$, if the product $A\times B$ exists then it is unique up to unique isomorphism. Basically, there may be some other $A\times'B$, but then there exists a unique isomorphism from $A\times B$ to $A\times' B$ which commutes with the projections. Remember the important definition, that an isomorphism $f: A \to B$ is an arrow such that there exists an arrow $g$ where the two identities $g\circ f = 1_A$ and $f\circ g = 1_B$. 
If $A\times B$ and $A\times' B$ both satisfy the definition of the product of $A$ and $B$ then we have the commutative diagrams:
$$\begin{array}{center}
           \;   A \times B  \\
           \; p_1 \swarrow \, \, \, \, \, \, \downarrow   f  \, \, \, \, \, \, \searrow p_2 \\
           \; A \longleftarrow \;   A \times' B  \longrightarrow B \\
\;p'_1~\;\;\;\;\;\;\;\;\;\;~\;p'_2\\
\end{array}$$
and 
$$\begin{array}{center}
           \;   A \times' B  \\
           \; p'_1 \swarrow \, \, \, \, \, \, \downarrow   g  \, \, \, \, \, \, \searrow p'_2 \\
           \; A \longleftarrow \;   A \times B  \longrightarrow B \\
\;p_1~\;\;\;\;\;\;\;\;\;\;~\;p_2\\
\end{array}$$
Where the arrows $f$ and $g$ must be unique by the definition of the product. Composing them also gives the unique morphism $g\circ f: A\times B \to A\times B$ which satisfies the universal property of the product again. But we also have that $1_{A\times B}$ is another arrow making the required diagram commute, so they must be identical, i.e. $g\circ f = 1_{A\times B}$. The same argument with the two products reversed shows that $f\circ g = 1_{A\times'B}$. Therefore there is an isomorphism between the two products and it is unique because the arrows $f$ and $g$ are. This argument is summarized by that "glued together" diagram on the website.
A: If $A\times B$ and $A\times'B$ both have the universal property of a product, then the answer to question 1 is "yes". For any pair of morphisms $C\to A$ and $C\to B$, there will be a unique morphism $C\to A\times B$ (and one to $A\times'B$) that commutes appropriately with the projections. That means $p_1,p_2$ will induce a morphism $f:A\times B\to A\times'B$, while $p_1',p_2'$ induce $g$ in the other direction.
Now we have a morphism $g\circ f:A\times B\to A\times B$. By the universal mapping property, $p_1\circ g\circ f=p_1'\circ f=p_1$ and likewise with $p_2\circ g\circ f$. But by the universal property of products, there's exactly one map $m:A\times B\to A\times B$ with $p_1\circ m=p_1$ and $p_2\circ m=p_2$, and it's $id_{A\times B}$. A similar proof shows that $f\circ g$ is the identity on the other product.
The important thing here is the universal property doesn't just guarantee a map $x:C\to A\times B$ for arrows $x_A:C\to A$ and $x_B:C\to B$--it specifically guarantees a unique $x$ with $p_1\circ x=x_A$ and $p_2\circ x=x_B$. That's where everything interesting about the product comes from.
What lets you glue together the diagrams is just that both products have projections to the same objects, and morphisms to each other. There's no magic, it's just a matter of domains and codomains.
