Explanation:
the car distance to the intersection will be
30t (30 miles for every hour).
the truck distance to the intersection will be
40t (40 miles for every hour).
the distance between the car and the truck will always be the Hypotenuse of a right-angled triangle with the legs being the actual distances from the starting intersection.
so, we use Pythagoras :
d² = (30t)² + (40t)² = 900t² + 1600t² = 2500t²
d = sqrt(2500t²) = 50t
so, their distance will increase 50 miles every hour.