The mean is the sum of all the numbers in a set divided by how many numbers there are. In this case, the mean is 7, so it looks like this:
#7=(a+b+c)/3#, multiply by 3 to both sides to get
#21=a+b+c# Therefore I have to find three numbers which add together to equal 21. There are an infinitude of three numbers which add up to 21, such as #{7,7,7}# or #{-22,1,42}#, but the set I have chosen to go with is #{6,7,8}#.
The median is the middle number of an ordered set of numbers. If the set has an odd amount of numbers #{1,2,3,4,5}#, the median is, the middle number (3). If the set has an even amount of numbers #{1,2,2,4}#, then the median is the two central-most numbers added together and then divided by two #(2+2)/2=2#.
To make a set of four with a median of 12, I must have 2 centre-most numbers that, when added together and divided by 2, equal 12, so
#12=(a+b)/2#. Multiply by 2 to get
#24= a+b#. Therefore the two centre-most numbers must equal 24 when added together, while the other numbers don't matter. There is an infinitude of four-number sets who's median is 12, such as #{pi,12,12,17}# and #{-100,-7,31,31.002}#, but I chose the set of #{1,11,13,20}#, because
#(11+13)/2=12, the median.
I hope I helped!