<h3>
Answer: x = 7</h3>
===========================================================
Explanation:
Since we have an odd number of values, this tells us that the median is part of the data set. It's the middle most item after we sort the values.
Recall that the mode is the most frequent item. Since the mode and median are the same, this must mean x can only be equal to one of the following
4, 9, 7 or 8
We can only pick one of those values.
----------------------
If x = 4, then the set {4,9,7,8,x} updates to {4,9,7,8,4} which sorts to {4,4,7,8,9}
The middle most item is in slot 3, which would be 7. So the median is 7.
The median 7 does not match with the mode 4.
So we cross x = 4 off the list.
-----------------------
If x = 7, then we have {4,7,7,8,9}
The mode is 7 and the median is 7. So far, so good.
Now let's compute the mean. Add up the values and divide by 5 because there are 5 items.
(4+7+7+8+9)/5 = 35/5 = 7
We've shown that the set {4,7,7,8,9} has mean 7.
Overall, that set has the same mean, median and mode. So the answer is confirmed.
I'll let you check the cases when x = 8 and x = 9.