Hey guys

Two straight roads intersect at right angles. Two men, A and B, are 100 km from the intersection, one on each road. They drive towards the intersection at 30 km/h and 40 km/h respectively. Find the distance of each driver from the intersection as a function of t, the time in hours for which they are driving. Hence, find their distance apart, d(t), at any time. For what value of t is their distance apart least?

How exactly do I do this question? I don't seem to get it .

Please help?