Suppose the point P (p, -1) divides the line segment joining points A(1,-3) B(6,2) in the ratio x : 1
then coordinats of P are ((6x+1)/(x+1),(2x-3)/(x+1))
But given P = (p,-1)
Therefore (6x+1)/(x+1)= p and (2x-3)/(x+1)=-1
=> 2x-3 = -x - 1
=> 3x = 2
=> x =2/3
p = (6x +1)/(x+1).....Substituting x=2/3
=> p = 3