The correct answer is:
B - longitudinal wave.
In a longitudinal wave, the particles of the medium move parallel to the direction of the wave's propagation, which is the case when a spring is compressed and then released, creating regions of compression and rarefaction as it oscillates back and forth.