Why do sound waves travel fastest in solids rather than in liquids or gases?
Sound waves or any other elastic waves travel by vibration particles of the medium through which they are travelling. The denser the medium, the closer the particles are and thus travelling for elastic waves is easier.
The elastic waves travel through a material by transferring energy and momentum through vibrations. The longer these vibrations travel, the wave travels.
Now, the denser a medium is, it's particles are more closely placed and thus transfer of energy and momentum is easier and they thus allow easier passage of sound through them than rarer objects likes gases or liquids where the particles are placed from each other at a distance.
Easier passage allows the wave to travel faster through solids than through gases or liquids.