The points $(2,5)$, $(6,1)$ and $(p,4)$ form a right angled triangle. Find the four possible values of the constant $p$.
$p=1,\; 9,\; 4+\sqrt{7},\; 4-\sqrt{7}$
The points $X(2,2)$, $Y(7,-2)$ and $Z(k,2)$ are vertices of a triangle where $k$ is a constant. Find the two possible values of $k$ for which $XYZ$ is isosceles and $XY = XZ$.
$k = -5;\ 9$