Given
The coordinates of the points on the path are:
P(20,7), R(-4,-9), O(20, -9), S(-4, -24)
The total length of the path from P to S is:

The distance d between two points can be found using the formula:

The distance between P and R:

The distance between R and O:

The distance between O and S:
Let x = the larger number
Let x - 17 = the smaller number
x + x + 17 = 41
2x + 17 = 41
2x = 58
x = 29
x - 17 = 29 - 17 = 12