The information we're given is purely based on distances, so our actual numbers don't matter. So we can assume the smallest salary is $0, and then the largest must be $10,000, because of the range. If that were our set, we'd get a median of $5000, but our mean wouldn't be large enough (our mean needs to be $7000). So we need to add elements that will raise the mean without changing the median. We want to add as few elements as possible, and since the mean is based on the sum of our values, we want to add values that are as large as possible.
Roughly half the values in a list are less than or equal to the median, so we'll want all of those values to be $5000, so they can be as large as possible. Roughly half the values are greater than or equal to the median, so we'll want to make all of those $10,000, so they can be as large as possible. So our list will look like this, if we're trying to maximize our mean with the fewest possible elements:
0, 5000, 5000, 5000, ...., 5000, 10000, 10000, 10000, ... 10000
Say we have n values equal to 5000. Then if the list has an odd number of values, for the median to be 5000 we can have at most n values equal to 10,000, and one value equal to zero. So using as many 10,000s as we can, the sum of the list is 5000n + 10,000n, and the list will have 2n+1 values in total. Since the mean is equal to 7000, we have
(5000n + 10,000n)/(2n + 1) = 7000
5000n + 10,000n = 14,000n + 7000
1000n = 7000
n = 7
and since we have 2n + 1 values in the list, 2(7) + 1 = 15 is the smallest number of values we can have.
I assumed we had an odd number of values, but it's harder to make the mean large with an even number of values, because you need to include an extra 5000 in the middle of the set, which drags the mean down. Of course, if one wanted to confirm that, one could try making a set with 14 values (one zero, seven 5000s, and six 10,000s) to confirm you don't get a mean as large as 7000.
It's not a question I'd worry about too much though.
_________________
GMAT Tutor in Montreal
If you are looking for online GMAT math tutoring, or if you are interested in buying my advanced Quant books and problem sets, please contact me at ianstewartgmat at gmail.com