Consider a point A', the image of A in y=x.
Therefore, the coordinates of A' are (4,3)
or
(Notice that A and B lie on the same side with respect to y=x ).
Then PA=PA'.
Thus, PA+PB is minimum, If PA′+PB is minimum,
i.e., if P,A′,B are collinear. Now, the equation of AB is y−3=7−413−3(x−4)
or 3y−10x+31=0
It intersects y=x at (31/7,31/7), which is the required point P.