The side of the square field = 10 meters
the perimeter of the field = 4 * 10 = 40 meters
The displacement depends on the initial position of the farmer on the square field boundary. Let us say he is at one corner of the field at the start.
the farmer travels 40 meters in 40 seconds. He covers 360 degrees in 40 seconds. He travels one side in 10 seconds.
In 2 minutes 20 seconds, ie., 140 seconds, the farmer makes 140/40 = 3.5 rounds around the field. So he circles completely three times in 120 seconds and then he travels along two sides in the remaining 20 seconds. Hence, he is at the opposite end of the diagonal.
The magnitude of the displacement will be: the length of diagonal
= 10 meters * √2 = 14.14 meters