A (0,0) is at the origin.
P is at (10, -5).
Let the coordinates of B be (x,y).
Because A, B, and P are collinear and PB : AB = 2/7, therefore
x = (7/9)*10 = 7.78
y = (7/9)*(-5) = -3.89
The distance between B and the x-axis is 3.89
The distance between B and the y-axis s 7.78
Answer: The x-axis is closer to B