Making use of the fact that $b = a \times n_1$ in the above equation, we get that $$c = \underbrace{(a \times n_1) \times n_2 = a \times (n_1 \times n_2)}_{\text{By associativity of multiplication}} = a \times n$$ where $n = n_1 \times n_2 \in \mathbb{Z}$.