The point the surveyor chose is 300 yards from A and 500 yards from B.
To picture this, imagine the surveyor standing at a corner. Point A is 300 yards to the right and Point B is 500 yards straight ahead.
Since this is a right angel, we know the following relationship between the length of the sides.
a2 + b2 = c2
where a2 and b2 are the lengths of the 2 sides squared and c2 is the length of the distance between the two points, A and B, squared.
3002 + 5002 = c2
90000 + 250000 = c2
340000 = c2
c = √340000 = 100√34 = distance between points A and B.