Will ran the longest
He ran for 56.57 yards, 13.56 yards longer than James.
Step-by-step explanation:
Step 1 :
Will ran the diagonal across a square field measuring 40 yards in each side.
The diagonal of a square can be obtained by the square root of the sum of the squares of its 2 sides [Because it forms the hypotenuse of a right angle triangle]
Hence when the side is 40 yards , the diagonal would be

So Will ran for 56.57 yards
Step 2 :
James ran the diagonal of a rectangular field with 25 yards length and 35 yards width.
The diagonal of the rectangle can be obtained by the square root of the sum of squares of its length and width.
Hence when the length is 25 yards and width is 35 , the diagonal would be
yards
So James ran for 43.01 yards
Step 3 :
Will ran for 56.57 yards and 43.01 yards.
Hence Will ran for longer distance of 56.57 yards, which is 13.56 yards more than James.
Somebody else had asked this question and they said it was 35 so your best bet is to go with 35
Lucas equation for his location is x(t) = 13t.
Alfonso's equation is x(t) = 238 - 21t
If you equate these, you get:
13t = 238 - 21t =>
34t = 238
t = 7
So after seven hours they meet.