The terms used in calculating standard deviation are deviations from the mean of the observations. As each number/observation is increased by 2, the deviations from the mean remain the same. Hence standard deviation remains the same. On the other hand, median gives the middle term or the average of the two middle terms accordingly when the total number of terms is odd or even. Thus, it has to increase by 2. Hence new median = 20 + 2 = 22 and SD = 4