x = 32
To find the media, you take the middle number. If there is no discrete middle number, take the sum of the two closest to the middle and divide by 2.
(24 + x)/2 = 28
Multiply by 2 on both sides to get:
24 + x = 56
Subtract 24 from both sides to isolate the variable:
x = 56 - 24
x = 32