Solution (source code)

= Solution
{c}

Use the convention $[\mathbf a,\mathbf b,\mathbf c]=\mathbf a\cdot(\mathbf b\times\mathbf c)$ for the <scalar triple product>. With $\mathbf q,\mathbf w$ as above, $\mathbf q=\mathbf n\times\mathbf w$. The <vector triple product identity> gives
$$
\mathbf q\times\mathbf w=-\mathbf w\times(\mathbf n\times\mathbf w)=-\mathbf n|\mathbf w|^2+\mathbf w(\mathbf w\cdot\mathbf n)=-\mathbf n|\mathbf w|^2.
$$
The <Lagrange identity for the cross product>, $|\mathbf a\times\mathbf b|^2=|\mathbf a|^2|\mathbf b|^2-(\mathbf a\cdot\mathbf b)^2$, also gives
$$
|\mathbf q|^2=|\mathbf v|^2-(\mathbf n\cdot\mathbf v)^2=|\mathbf w|^2.
$$
Taking the <dot product> with the <unit vector> $\mathbf n$ proves
$$
\boxed{[\mathbf n,\mathbf n\times\mathbf v,\mathbf n\times(\mathbf v\times\mathbf n)]=-|\mathbf n\times\mathbf v|^2.}
$$