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?
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}$.