Consider the "journey" from (3, -1) to (8, 9).

The x-coordinate increases by 5, while the y-coordinate increases by 10.

Quick mental trial-and-error tells us that the two points lie on the line y = 2x - 7

Now we want the point of intersection of y = 2x - 7 and x - y - 2 = 0

Using substitution:

x - y - 2 = 0

x - (2x - 7) - 2 = 0

-x + 5 = 0

x = 5

y = 2(5) - 7

y = 3

The point of intersection is (5, 3).

The three points under consideration are (3, -1), (5, 3) and (8, 9).

Just dealing with x-coordinates: from 3 to 5 = 2 units, and from 5 to 8 = 3 units.

SOLUTION: the straight line x - y - 2 = 0 divides the line segment (3,-1) to (8,9) in the ratio 2:3