Show that $f(x,y,z)=0$ if and only if $(\sqrt {x^2+y^2}-1)^2+z^2=r^2$. 
Define $f(x,y,z)=(x^2+y^2+r^2-z^2-1)^2-4(x^2+y^2)(r^2-z^2)$, where $0<r<1$ Show that $f(x,y,z)=0$ if and only if $(\sqrt {x^2+y^2}-1)^2+z^2=r^2$.

Here is what I have tried:
Let $f(x,y,z)=0$:
$(x^2+y^2+r^2-z^2-1)^2-4(x^2+y^2)(r^2-z^2)=0$
$x^4+x^2y^2+x^2r^2-x^2z^2-x^2+x^2y^2+y^4+r^2y^2-y^2z^2-y^2+r^2x^2+r^2y^2+r^4-r^2z^2-r^2-z^2x^2-z^2y^2-z^2r^2+z^4+z^2-x^2-y^2-r^2+z^2+1-4(x^2r^2-x^2z^2+y^2r^2-y^2z^2)=0$
$x^4+x^2y^2+x^2r^2-x^2z^2-x^2+x^2y^2+y^4+r^2y^2-y^2z^2-y^2+r^2x^2+r^2y^2+r^4-r^2z^2-r^2-z^2x^2-z^2y^2-z^2r^2+z^4+z^2-x^2-y^2-r^2+z^2+1-4(x^2r^2-x^2z^2+y^2r^2-y^2z^2)=0$
$1+ r^4+x^4-2y^2 + y^4 + 2 z^2 + 2 y^2 z^2 + z^4 + 
 2 x^2 (-1 + y^2 + z^2) - 2 r^2 (1 + x^2 + y^2 + z^2)=0$
What should I do next? By the way I think it's absolutely horrible to do it this way, is there any easy way to do?

Choosing good notation is sometimes one of the keys to solving a problem and avoiding complicated mess. This problem is an excellent illustration of that. So let's take $a$ to be $x^2+y^2$ and $b$ to be $r^2-z^2$. The problem reduces down to showing that $$(a+b-1)^2-4ab=0\iff(\sqrt{a}-1)^2-b=0.$$
We have $$\eqalign{(\sqrt{a}-1)^2-b=0&\iff a-2\sqrt{a}+1-b=0\\
&\iff a-b+1=2\sqrt a\\
&\iff (a-b+1)^2=4a\\
&\iff a^2-2ab+2a+b^2-2b+1=4a\\
&\iff a^2-2ab-2a+b^2-2b+1=0\\
&\iff a^2+2ab-2a+b^2-2b+1=4ab\\
&\iff (a+b-1)^2=4ab\\
&\iff (a+b-1)^2-4ab=0.}$$
