City B has more variability because it’s upper and lower quartiles are wider than City A. This means we need to find the IQR of City B.
The IQR is simply the difference between the upper and lower quartiles.
The lower quartile is 40. The upper quartile is 80.
80 - 40 = 40
The Interquartile Range of City B is 40.