If the point $\mathrm{P}(\mathrm{k}-1,2)$ is equidistant from the points $\mathrm{A}(3, \mathrm{k})$ and $\mathrm{B}(\mathrm{k}, 5)$, find the value of $\mathrm{k}$.
If the point $\mathrm{P}(\mathrm{k}-1,2)$ is equidistant from the points $\mathrm{A}(3, \mathrm{k})$ and $\mathrm{B}(\mathrm{k}, 5)$, find the value of $\mathrm{k}$.

The given points are $P(k-1,2), A(3, k)$ and $B(k, 5)$.

$
\begin{aligned}
&\because \mathrm{AP}=\mathrm{BP} \\
&\therefore \mathrm{AP}^{2}=\mathrm{BP}^{2} \\
&\Rightarrow(\mathrm{k}-1-3)^{2}+(2-\mathrm{k})^{2}=(\mathrm{k}-1-\mathrm{k})^{2}+(2-5)^{2} \\
&\Rightarrow(\mathrm{k}-4)^{2}+(2-\mathrm{k})^{2}=(-1)^{2}+(-3)^{2} \\
&\Rightarrow \mathrm{k}^{2}-8 \mathrm{y}+16+4+\mathrm{k}^{2}-4 \mathrm{k}=1+9 \\
&\Rightarrow \mathrm{k}^{2}-6 \mathrm{y}+5=0 \\
&\Rightarrow(\mathrm{k}-1)(\mathrm{k}-5)=0 \\
&\Rightarrow \mathrm{k}=1 \text { or } \mathrm{k}=5 \\
&\text { Hence, } \mathrm{k}=1 \text { or } \mathrm{k}=5
\end{aligned}
$