three positive whole numbers have a median of 7 and a mean of 5 find the range of these 3 numbers

The median is the middle number so ...

Let the numbers be A, 7, B

(A+B+7)/3 = 5

A+B+7=15

A+B=8

now remember that A and B are whole positive numbers and $$A\le7\le B$$

So the only possible numbers are 1,7,7

The range is 7-1=6