When light travels through a medium, its velocity depends on the density of the medium.
The formula to calculate the speed of light can be written as
v=νλ...(1)
From equation (1), it can be concluded that higher the speed, higher is the wavelength. Hence, the wavelength of light depends on the refractive index of the medium.
Because of changed wavelength the phase difference changes while the two waves travel the same distance.
Thus, both A and R are correct and R is the correct explanation of A.