The interquartile range IQR of a dataset is the difference between the upper and lower quartiles, Q3 and Q1
The median of the whole dataset is Q2 and corresponds to the value x=3.5
The value of Q1 is the median of the lower 3 values: Q1=2
The value of Q3 is the median of the upper 3 values: Q3=5
The IQR is: 5 - 2 = 3