Start by looking at the components of the line, basically the legs if you were to make it a right triangle.
components = < x1 - x2, y1 - y2 >
< 10-5 , 12-4 > = < 5 , 8 >
So the line starts at A and goes right 5 then up 8 to point B.
We need a point 3:1 distance which means that if X is our new point, length AX is 3 times length of XB.
3+1 = 4 parts total
Point X will be 3/4 distance
3/4 the components
< 5(3/4) , 8(3/4) > = < 15/4 , 6 >
Add these to point A to go right and up to the new point X.
(5 + 15/4 , 4 + 6) = (35/4 , 10)
35/4 = 8 3/4
so the first one is correct.