We know that n = sin i/sin r
For the same angle of incidence i, the refractive index will be maximum for the medium for which 'r ’ is minimum i.e., for the medium R.
Further, we know that n = c/v
Speed of light is faster in rarer medium so, for the medium r, the value of refractive index will be large and speed of the light minimum. The refractive index is small in p medium. Hence p is rarest medium so the speed of light maximum.