(b) Violet and Red
In dispersion by a prism, violet light bends the most and red light bends the least. The lower ray (P) is deviated more, so P is Violet; the upper ray (Q) is deviated less, so Q is Red.
Source: Light – Reflection and Refraction, Section 10.4 Dispersion of White Light by a Glass Prism
The key principle: violet deviates the most → appears at the bottom of the spectrum (lower emergent ray = P); red deviates the least → appears at the top (upper emergent ray = Q). The order from bottom to top is VIBGYOR. Examiners look for correct identification of both colours mapped to their positions in the diagram.