7. Farmer John is grazing his cows at the origin. There is a river that runs east to west 50 feet north of the origin. The barn is 100 feet to the south and 80 feet to the east of the origin. Farmer John leads his cows to the river to take a swim, then the cows leave the river from the same place they entered and Farmer John leads them to the barn. He does this using the shortest path possible, and the total distance he travels is $d$ feet. Find the value of $d$.
Solution:
$$
40 \sqrt{29}
$$

Suppose we move the barn to its reflection across the river's edge. Then paths from the origin to the river and then to the old barn location correspond to paths from the origin to the river and then to the new barn location, by reflecting the second part of the path across the river, and corresponding paths have the same length. Now the shortest path from the origin to the river and then to the new barn location is a straight line. The new barn location is 200 feet north and 80 feet east of the origin, so the value of $d$ is $\sqrt{200^{2}+80^{2}}=40 \sqrt{29}$.