the other way can be
average speed = di + d2 / ti + t2
it can help if the problem has two d or t or both of them