Solution to Abstract Algebra by Dummit & Foote 3rd edition Chapter 1.6 Exercise 1.6.12
Let $A$, $B$, and $C$ be groups. Show that $A \times (B \times C) \cong (A \times B) \times C$.
Solution: We know from set theory that the mapping $\varphi : A \times (B \times C) \rightarrow (A \times B) \times C$ given by $$\varphi((a,(b,c))) = ((a,b),c) $$is a bijection, with two-sided inverse $\psi((a,b),c) = (a,(b,c))$. Moreover $\varphi$ is a homomorphism, as we show.
Let $a_1, a_2 \in A$, $b_1,b_2 \in B$, and $c_1,c_2 \in C$. Then \begin{align*}\varphi((a_1,(b_1,c_1)) \cdot (a_2,(b_2,c_2))) = &\ \varphi((a_1a_2, (b_1,c_1)\cdot(b_2,c_2)))\\ =&\ \varphi((a_1a_2, (b_1b_2, c_1c_2))) \\=&\ ((a_1a_2, b_1b_2),c_1c_2)\\ =&\ ((a_1,b_1) \cdot (a_2,b_2), c_1c_2)\\ =&\ ((a_1,b_1),c_1) \cdot ((a_2,b_2),c_2)\\ =&\ \varphi((a_1,(b_1,c_1))) \cdot \varphi((a_2,(b_2,c_2))). \end{align*} Thus $\varphi$ is an isomorphism.