

Both light and sound travels faster in a rarer medium than in a denser medium. But light travels faster than sound.
The reason is that light is made up of transverse waves which in general can propagate easily through a medium as it has crests and troughs of equal energies.
However, sound waves are longitudinal in nature, made up of compressions and rarefactions, which needs to push through the molecules of the surrounding mediumto travel. So this makes its propagation slightly complicated and hence slower than light waves.
