The wave equation links the three quantities of any wave: wave speed (m/s) = frequency (hertz, Hz) × wavelength (m), or v = f × λ.
In a vacuum every EM wave has the same speed, 3.0 × 108 m/s. So if the speed cannot change, a higher frequency must mean a shorter wavelength. Frequency and wavelength are inversely proportional across the spectrum. If the frequency doubles, the wavelength halves.
Worked example: a radio wave has a frequency of 1.5 × 108 Hz. Wavelength = speed ÷ frequency = (3.0 × 108) ÷ (1.5 × 108) = 2 m.
In the microwave practical, a tray of chocolate is heated until some spots melt. The melted spots are half a wavelength apart, so the wavelength is twice the distance between them. Multiplying this by the frequency shown on the oven gives a value for the speed of the waves.