Solution (source code)

= Solution

Assume <normal dispersion>, so shorter visible wavelengths have larger <refractive indices>. At fixed external angle $\theta$, the relevant criticality parameter is
$$
n\sin i_B=\sin\alpha\sqrt{n^2-\sin^2\theta}-\cos\alpha\sin\theta,
$$
which increases with $n$ on this route. Thus \b[shorter-wavelength blue light is totally reflected at B and reaches C, while longer-wavelength red light can transmit through B]; green lies at the critical threshold. The prism separates the routes by wavelength near the green cutoff.

The totally reflected rays emerging from C have the same external deviation $180^\circ-2\alpha+2\theta$ despite their different <refractive indices>; their exit positions can differ. Red light also has a partially reflected component by the <Fresnel equations>, so C is not a mathematically perfect colour cutoff. The observation concerns total versus partial reflection, with the transmitted B rays spread by wavelength. Anomalous dispersion, if present, would require the actual $n(\lambda)$ instead of the normal ordering assumed here.