In theory, if two materials have exactly the same refractive index, the light passes through without any (or minimal) scattering or refraction. The light travels straight because it cannot detect any difference in the two materials, hence the speed of the travelling light does not change (bend).
What happens when 2 objects have same refractive index?
If a transparent object is surrounded by another material that has the same index of refraction, then the speed of light will not change as it enters the object. No reflection and no refraction will take place, and the object will be invisible.
Can two materials have same refractive index?
Refractive index is not the same at every wavelength. In addition, it can vary due to environmental conditions such as temperature and pressure, and even light intensity.