Solution (source code)

= Solution

The <vector triple product> identity gives
$$
\boxed{A\times(B\times C)
=B(A\cdot C)-C(A\cdot B)}.
$$
Applying the same identity after reversing the outer cross product gives
$$
\boxed{(A\times B)\times C
=B(A\cdot C)-A(B\cdot C)}.
$$
The formulas differ because the cross product is not associative.