Step 1:
$P$ represents the variable complex number $z$ on the complex plane where $\mid z-5i\mid=\mid z+5i\mid$
Let $z=x+iy$
$\mid x+iy-5i\mid=\mid x+iy+5i\mid$
$\mid x+i(y-5)\mid^2=\mid x+i(5+y)\mid^2$
Step 2:
Therefore $x^2+(y-5)^2=x^2+(y+5)^2$
$(y+5)^2-(y-5)^2=0$
$\Rightarrow 20y=0$
$y=0$
The locus of $P$ is the $x$-axis.