Categorical products seen as final objects in ... what category? I am working on Chapter 1 of Aluffi's Chapter 0 and want to prove the following exercise:

5.8: Show that in every category $C$ the products $A\times B$ and $B\times A$ are isomorphic, if they exist. (Hint: observe that they both satisfy the universal property for the product of $A$ and $B$, then use [the fact the terminal objects of the same type are isomorphic]).

The way that Aluffi defines the product of two objects $A,B\in\operatorname{Obj}(C)$ is by constructing a category $C_{A,B}$ where the product is a final object. However, this construction is a bit ambiguous. I see two possible definitions:


*

*The objects of $C_{A,B}$ are tuples $(X,f,g)$ with $f$ and $g$ ordered where $X$ is an object of $C$, $f\in\operatorname{Hom}_C(X,A)$ and $g\in\operatorname{Hom}_C(X,B)$. The morphisms of $C_{A,B}$ from $(X,f_1,g_1)$ to $(Y,f_2,g_2)$ are the morphisms $\varphi\in\operatorname{Hom}_C(X,Y)$ such that $f_1 = \varphi f_2$ and $g_1 = \varphi g_2$, i.e. the corresponding diagram commutes. In this definition, $C_{A,B}\ne C_{B,A}$.


*The objects of $C_{A,B}$ are the tuples $(X,\{f,g\})$ with $f$ and $g$ not ordered, and the rest of the construction is the same. In this definition, $C_{A,B} = C_{B,A}$.

In the second definition, the given problem is straightforward. The products $A\times B$ and $B\times A$ are final objects in the same category, so they're isomorphic. However, given the first definition, these are two objects in two separate categories.
I'm sure that there's some reasoning here, that there's a functor $F:C_{A,B}\to C_{B,A}$ which is nice and says that $A\times B$ and $B\times A$ are essentially the same, but at this point in the book functors have not made an appearance and I'd rather not use them.
Is the second definition the correct definition, or am I missing something here?
 A: In general, a limit for a diagram $D : \mathcal{J} \to \mathcal{C}$ in a category $\mathcal{C}$ is a terminal object of the category $\mathbf{Cone}(D)$ of cones over $D$. In this case, $\mathcal{J}$ is the discrete category $\mathbf{2}$ on two objects (with only identity morphisms), and $D$ is the functor sending one of the objects to $A$ and the other object to $B$.
Let's spell this out. Given a functor $D : \mathcal{J} \to \mathcal{C}$, define $\mathbf{Cone}(D)$ to be the category with data as follows:


*

*An object of $\mathbf{Cone}(D)$ consists of an object $C$ of $\mathcal{C}$ and a family $(\mu_j : D(j) \to C \mid j \in \mathcal{J})$ of morphisms of $\mathcal{C}$, such that for all $\alpha : j \to j'$ in $\mathcal{J}$, we have $\mu_{j'} \circ \alpha = \mu_j$.

*A morphism $(C, \mu_j) \to (D, \nu_j)$ in $\mathbf{Cone}(D)$ is a morphism $f : C \to D$ such that $\nu_j \circ f = \mu_j$ for all $j \in \mathcal{J}$.


You can check readily that a limit $(L, \lambda_j)$ for $D$ is the same thing as a terminal object of $\mathbf{Cone}(D)$.
In the case of products, the category $\mathbf{Cone}(D)$ has as objects spans $A \xleftarrow{p} C \xrightarrow{q} B$, and a morphism $(A \xleftarrow{p} C \xrightarrow{q} B) \to (A \xleftarrow{r} D \xrightarrow{s} B)$ is a morphism $f : C \to D$ such that $r \circ f = p$ and $s \circ f = q$. A terminal object of this category is precisely a product of $A$ and $B$ in $\mathcal{C}$.
Evidently, this corresponds with your definition #1.
A: The first definition is the correct definition.
As for the exercise, the idea is to show that if $(P,g,f)$ is a terminal object in $C_{B,A}$, then $(P,f,g)$ is also a terminal object in $C_{A,B}$.  This is pretty easy: you just swap the maps going to $A$ and the maps going to $B$ everywhere.  As you suggest, what is really going on here is that the functor $F:C_{A,B}\to C_{B,A}$ which swaps the two maps is an isomorphism of categories.  But if you want to avoid using functors, you can just explicitly write out what is going on with this swapping to show that a terminal object of $C_{B,A}$ gives a terminal object of $C_{A,B}$.
