wave speed (longitudinal) – the speed (velocity) which a longitudinal compression or rarefaction is travelling
Note: Longitudinal think sound.
The formula for calculating wave speed is:
Compression or rarefaction speed = frequency x distance between compression or rarefaction
Speeding along she frequently waved with the full length of her arm (speed = frequency x length between compression or rarefaction).

Alternatively, think logically:
If you know the distance between compressions or rarefactions and the frequency that this length passes a point every second then logically the speed is this length multiplied by the frequency. Easy.
Speed = distance between compressions or rarefactions x frequency it passes
For longitudinal waves such as sound waves, particles vibrate backwards and forwards so the speed refers to how quickly the compressions and rarefactions move through a medium.

Speed = frequency x wavelength.
The following is how these compressions and rarefactions move.

Sound waves travel slower in air (gas) than in solids because gas particles are far apart making energy transfer between vibrating particles less efficient and slower. In contrast solids have tightly packed particles with strong, rigid bonds allowing vibrations to pass quickly.
Molecules in air are far apart requiring more time for a vibration to travel from one particle to the next. This can be demonstrated by using dominoes and increasing the gap between dominoes to represent different media.

It is very important to realise that the frequency of a sound wave stay the same when it passes from one medium to another.
If a speaker produces 1000Hz sound compressions per second it pushes out 1000 compressions per second no matter what the medium the wave enters.
The frequency of a sound wave (it should be a sound compression because it isn't technically a wave) stays the same when it passes from one medium to another because the frequency is set by the source of the sound, not the medium.
Frequency is how many vibrations per second. That vibration rate is determined by whatever is producing the sound {e.g. speaker, tuning fork, vocal cords). When the wave enters a new medium, the particles vibrate at the same rate as the incoming wave.
If the frequency changed at the boundary the particles at the boundary would have to vibrate at two different rates at once - which is impossible. So the vibration rate (frequency) must stay continuous.
The frequency of a sound wave is set by the source.
The source is the boss.
We now know that sound passes through solids faster than gasses.
We know know that the frequency will always be the same (the source is the boss).
So what happens to the wavelength between a solid and a gas?
Speed = distance compression/rarefaction x frequency
Because frequency is constant if the speed is faster then distance between compression must be longer. (Example calculation: speed 4 m/s = distance between compressions 4m x frequency 1Hz).
Because frequency is constant if the speed is slower then distance between compression must be shorter. (Example calculation: speed 1 m/s = distance between compressions 1m x frequency 1Hz).

Summary
