Data analysis fundamentals quiz

Looking for advice for these types of questions. the question is:

I understand why the answer is D but when doing the question I knew I was looking for numbers to make the mean and median equal that weren’t 12 and couldn’t find it in the time. I have this problem with these types of questions where I i feel like there’s something intuitive that im missing?

Consider the extremes. In other words, what is the largest possible value of x? How about if we are looking for the smallest possible value of x (that meets the rules in the question)?