The points are A(2,2) and B(5,-2)
It is given that the point P is in the x-axis therefore lets assume it to be P(x,0)
it is also given that AP is perpendicular to BP
therefore if M1 is the slope of AP and M2 is the slope of BP then we know that
M1 x M2 = -1
therefore (2-0)/2-x)*(-2-0)/5-x)=-1
you will get a quadratic equation x2-7x+6=0
solving you will get x=1 or x=6
so the point required is P(1,0) or P(6,0)
HOPE THAT YOU GOT WHAT YOU NEEDED
BEST OF LUCK FOR YOUR EXAMINATIONS