$\mathrm{AP}=\mathrm{BP}$
$\Rightarrow \sqrt{(x-5)^{2}+(y-1)^{2}}=\sqrt{(x+1)^{2}+(y-5)^{2}}$
$\Rightarrow(x-5)^{2}+(y-1)^{2}=(x+1)^{2}+(y-5)^{2}$
$\text { (Squaring both sides) }$
$\Rightarrow x^{2}-10 x+25+y^{2}-2 y+1=x^{2}+2 x+1+y^{2}-10 y+25$
$$
\begin{aligned}
&\Rightarrow-10 x-2 y=2 x-10 y \\
&\Rightarrow 8 y=12 x \\
&\Rightarrow 3 x=2 y \\
&\text {Therefore, } 3 x=2 y
\end{aligned}
$$