Diagonal of will's square field is [tex]D_1=40 \ yards[/tex].
Diagonal of James's rectangular field :
[tex]D_2=\sqrt{35^2+25^2}\\\\D_2=\sqrt{1850}\ yards\\\\D_2=43.01\ yards[/tex]
James runs 3.01 yards more distance than will.
Therefore, James run a longer distance.
Hence, this is the required solution.