since they are leaving each other perpendicularly, you need to use a right triangle.
The lapse of time is equal so, t is the same for both directions. a=24t for one leg of your triangle and b=32t for the other. c=d is the hyponenuse.
Replace a2+b2=c2(pathagoreum theorem) with the given info above.
(24t)2 + (32t)2 = d2
solve for d by taking the square root of both sides.
d = sqrt((24t)2 + (32t)2)
hope this helps!