recall your d = rt, distance = rate * time.
A = first train.
B = second train leaving 2 hrs later.
if say by the time they meet, train B has traveled "t" hours, we know that train A has been traveling 2 hours more than that, because it left 2 hours earlier than train B, thus it has traveled "t + 2" hours.
keeping in mind that by the time they meet, they both have traveled "d" kilometers.

