What happens to the speed of sound as it travels through a gas and into a solid?

The speed of sound increases when it travels through a gas and into a solid. This is because sound travels faster in solids than in gases due to the higher density and stiffness of solids compared to gases. As the sound waves pass from a less dense medium (gas) to a more dense medium (solid), the speed of sound increases.