# Product associativity in category theory

The same question is given here Categorical products are associative, however, one of the answers uses concepts not introduced yet in my book, and the other provides a link (https://compose.ioc.ee/categoryTheory2020/week3/week3.pdf, "Diagram Chasing") which to me is still unclear. I am trying to prove $$A \times (B \times C) \cong (A \times B) \times C$$

Basically, the answer in the link states that we can form the following four commuting diagrams:

From these we have the diagram:

Then the author concludes that because this arrow is unique, it must be the identity arrow. This is the part that I do not follow. Where in the proof have we concluded that $$q_2 \circ q_1$$ makes the last diagram commute? Once that is established then I understand how we can conclude $$q_2 \circ q_1 = 1_{A(BC)}$$.

For the left-hand triangle we have $$p_{A2} ∘ q_2 ∘ q_1 = p_{A1} ∘ p_{AB} ∘ q_1 = p_{A1} ∘ q_{AB} = p_{A2}$$ by the definition of $$q_2$$, the definition of $$q_2$$, and the definition of $$q_{AB}$$.
For the right-hand triangle we have \begin{align*} p_{BC} ∘ q_2 ∘ q_1 &= q_{BC} ∘ q_1 \tag{1} \\ &= ⟨p_{B1} ∘ p_{AB}, p_{C1}⟩ ∘ q_1 \tag{2} \\ &= ⟨p_{B1} ∘ p_{AB} ∘ q_1, p_{C1} ∘ q_1⟩ \\ &= ⟨p_{B1} ∘ q_{AB}, p_{C2} ∘ p_{BC}⟩ \tag{3} \\ &= ⟨p_{B2} ∘ p_{BC}, p_{C2} ∘ p_{BC}⟩ \tag{4} \\ &= ⟨p_{B2}, p_{C2}⟩ ∘ p_{BC} \\ &= 1_{BC} ∘ p_{BC} \\ &= p_{BC} \,, \end{align*} where for $$(1)$$ we use the definition of $$q_2$$, for $$(2)$$ we use the definition of $$q_{BC}$$, for $$(3)$$ we use the definition of $$q_1$$, for $$(4)$$ we use the definition of $$q_{AB}$$.