The following set of data is arranged from lowest to highest: 2, 3, 3, 4, a, b, 6, 6, 9, 12. What are the values of a and b that will make the median equal to 5 and mode equal to 6?

There are 10 values, so the median is (a+b)/2 = 5

Since the mode is 6, either a or b or both must be 6

So, let b=6.
Now you can find a.