The given points are A(4,7), B(p,3) and C(7,3).
Since A,B and C are the vertices of a right angled triangle then, (AB)2+(BC)2=(AC2)
[By Pythagoras theorem]
[(p−4)2+(3−7)2]+[(7−p)2+(3−3)2]=[(7−4)2+(3−7)2]
(p−4)2+(−4)2+(7−p)2=(3)2+(−4)2
p2+16−8p+16+49+p2−14p=9+16
2p2−22p+56=0
p2−11p+28=0
p2−7p−4p+28=0
p(p−7)−4(p−7)=0
(p−7)(p−4)=0
p=4 or 7
p≠7 (As B and C will coincide)
So, p=4