x=the missing value
the median is the middle number, but in this case there are two which happens to be 25 and x
so the formula is
25+x/2=31.5
use algebra to solve
25+x=63
x=63-25
x= 38
Therefore, the missing value is 38.
Hope this helped. Let me know if you have any further questions:)