Dear student,
If only compression and reaction taking place then sound wave is moving from left to right. If medium is air, then particles of air will be displaced both rightward and leftward as the energy of the sound wave passes through it. The motion of the particles is parallel (and anti-parallel) to the direction of the energy transport. Thus sound wave will behave as a longitudinal wave.
Regards