Firstly, let's look at this ratio 5:2. Despite what you may think, 5:2 is not equal to 5/2, but rather it is equal to "5 equal parts to 2 equal parts", which make up a total of 7 equal parts. In short, they want us to place point P at 5/7 of line AB.
Firstly, how far is -3 to 4 (the x coordinates)? That would be 7 units. Multiply 5/7 by 7:
Next, how far is 1 from 5 (the y-coordinates)? That would be 4 units. Multiply 5/7 by 4:
Next, since from -3 to 4 you are increasing, add 5 to -3, which gets you a sum of 2. 2 is the x-coordinate of point P.
Next, since from 1 to 5 you are increasing, add 2 6/7 to 1, which gets you a sum of 3 6/7. 3 6/7 is the y coordinate of point P.
Putting it together, point P is at