Planck and Einstein showed that the energy of light is proportional to its frequency, f.  (This may be discussed in more detail elsewhere in your course.)  Light does not lose or gain energy when moving from one medium to another, so it does not change frequency either.

The speed of light v in a medium is proportional to both its frequency and its wavelength λ:

v = λf.

Since the frequency is constant while light changes media, the wavelength must change along with the speed:

λ12 = (v1/f1)/(v2/f2) = (v1/v2)(f2/f1)
λ12 = (n2/n1).

This leads to the relationship between the wavelength of light and the index of refraction given in your reading.