Hmmm, d = rt + rt 21 = 12*t + 8*(2-t), clarify what doesn't make sense so I can help you with that part.
Since you know he took 2 hrs you have one set, t, and the other is simply the remainder of the 2 hours, 2-t.