When light is going from vacuum to another medium, then the value of refractive index is called the absolute refractive index.ve ind
Absolute refractive index=Speed of light in vacuum / Speed of light in medium
According to question,
For A,
Speed of light in vacuum / Speed of light in medium A=na------(i)
For B,
Speed of light in vacuum / Speed of light in medium B=nb-----(ii)
Dividing (ii) by (i),
nb /na=Speed of light in medium A/Speed of light in medium B
Now, refractive index of medium 'B' with respect to medium 'A=Speed of light in medium A/Speed of light in medium B=nb/na=b/a
Optical density of a medium is the measure of its transmittance for a radiation of particular wavelength. Higher is the value of optical density, lower is transmittance. it is expressed as log10 (1/T), where T is the transmittance in percentage (T = I/I0).
And also a higher value of refractive index means higher optical density. This means that light travels slower, in a medium with high optical density. Speed of light slows down in a optically denser because light interacts with the matter inside the denser medium.