Explanation:
Let the numbers be a, b, c in ascending order.
Mean is 7, i.e. (a+b+c)/3 = 7 or a+b+c=21
Median(middle number) is 5, i.e. b=5
Range is 8, i.e. c-a=8 or c=8+a
Solving the above three equations simultaneously, we have
a+5+8+a=21
a=4, hence c=12
Therefore the three numbers are 4, 5 and 12