Since the measurements are in different units, let us first convert them all to one unit and then compare.
1 km = 1000 m
⇒2 km = 2 × 1000 m = 2000 m
1 m = 100 cm
⇒ 2000 m = 2000 × 100 cm = 2,00,000 cm
1 cm = 10 mm
⇒ 2,00,000 cm = 2,00,000 × 10 mm = 20,00,000 mm
Similarly, 500 m = 500 × 100 cm = 50,000 × 10 mm = 5,00,000 mm.
Also, 20 cm = 20 × 10 mm = 200 mm.
Since 100 mm < 200 mm < 5,00,000 mm < 20,00,000 mm, we must have
100 mm < 20 cm < 500 m < 2 km.