Help with algebra, rearrange equations I have:

$$
r=\frac{1-x^2-y^2}{(1-x)^2+y^2} \tag 1
$$
  And want to write $(1)$ as:
  $$
\Big (x-\frac{r}{1+r}\Big )^2+y^2=\Big (\frac{1}{1+r}\Big )^2 \tag 2
$$

First method, starting from $(1)$:
$$
r=\frac{1-x^2-y^2}{x^2-2x+1+y^2}\iff
$$
$$
r(x^2-2x+1+y^2)=1-x^2-y^2 \iff
$$
$$
rx^2-r2x+r+ry^2=1-x^2-y^2 \iff
$$
$$
rx^2+x^2-r2x+r+ry^2+y^2=1 \iff
$$
$$
x^2(r+1)-r2x+r+y^2(r+1)=1 \iff
$$
$$
x^2-x\frac{2r}{r+1}+\frac{r}{r+1}+y^2=\frac{1}{r+1} \tag 3
$$
Completing the square of $x^2-x\frac{2r}{r+1}$:
$$
x^2-x\frac{2r}{r+1}+\Big (\frac{r}{1+r} \Big )^2-\Big (\frac{r}{1+r} \Big )^2=\Big (x-\frac{r}{1+r}\Big )^2-\Big (\frac{r}{1+r} \Big )^2
$$
Inserting in $(3)$ gives:
$$
\Big (x-\frac{r}{1+r}\Big )^2-\Big (\frac{r}{1+r} \Big )^2+\frac{r}{r+1}+y^2=\frac{1}{r+1} \tag 4
$$
I'm stuck here, what is next?
Second method, starting from $(2)$:
$$
\Big (x-\frac{r}{1+r}\Big )^2+y^2=\Big (\frac{1}{1+r}\Big )^2 \iff
$$
$$
\Big (\frac{x(r+1)-r}{1+r}\Big )^2+y^2=\Big (\frac{1}{1+r}\Big )^2 \iff
$$
$$
(x(r+1)-r)^2+y^2(1+r)^2=1 \tag 5
$$
Expand $(x(r+1)-r)^2$: 
$$
(x(r+1)-r)^2=x^2(1+r)^2-x2r(1+r)+r^2 
$$ 
Inserting in $(5)$ gives:
$$
x^2(1+r)^2-x2r(1+r)+r^2+y^2(1+r)^2=1 \iff
$$
$$
x^2(1+2r+r^2)-2rx-2xr^2+r^2+y^2(1+2r+r^2)=1\iff
$$
$$
x^2+2rx^2+r^2x^2-2rx-2xr^2+r^2+y^2+2ry^2+r^2y^2=1\iff
$$
Collect $r^2$ and $r$:
$$
r^2(x^2-2x+1+y^2)+r(2x^2-2x+2y^2) = 1-x^2-y^2 \iff
$$
$$
r^2((x-1)^2+y^2)+r(2x(x-1)+2y^2) = 1-x^2-y^2 \tag 6
$$
I'm stuck here, I don't know how to go from $(6)$ to $(1)$. 
 A: Your equation $$\left(x-\frac{r}{1+r}\right)^2+y^2-\frac{1}{(1+r)^2}=0$$ is equivalent to
$$rx^2+ry^2-2xr+x^2+y^2+r-1$$.
A: One:
$$r=\frac{1-x^2-y^2}{(1-x)^2+y^2} \Rightarrow y^2=\frac{1-x^2-(1-x)^2r}{1+r}$$
Two:
$$\Big (x-\frac{r}{1+r}\Big )^2+y^2=\Big (\frac{1}{1+r}\Big )^2 \Rightarrow \\
y^2=\left[\frac1{1+r}-x+\frac{r}{1+r}\right]\cdot \left[\frac1{1+r}+x-\frac{r}{1+r}\right]=\\
(1-x)\cdot\frac{(1+x)-(1-x)r}{1+r}=\frac{1-x^2-(1-x)^2r}{1+r}.$$
A: Don't forget to get a common denominator first, before you add or subtract fractions.
Starting from (4)
$$
\begin{align}
\Big(x-\frac{r}{1+r}\Big)^2-\Big(\frac{r}{1+r} \Big)^2+\frac{r}{r+1}+y^2&=\frac{1}{r+1}\tag 4\\
\Big(x-\frac{r}{1+r}\Big)^2+y^2&=\frac{1}{r+1} +\Big(\frac{r}{1+r} \Big)^2- \frac{r}{r+1}\\
&=\frac{r+1}{(r+1)^2} +\frac{r^2}{(r+1)^2}- \frac{r(r+1)}{(r+1)^2}\\
&=\frac{r+1+r^2-r^2-r}{(1+r)^2}\\
&=\frac{1}{(1+r)^2} = \Big(\frac{1}{r+1}\Big)^2\\
\end{align}
$$
A: Use the componendo and dividendo rules, i.e. 
$\frac ab = \frac cd \implies \frac{b-a}{b+a} = \frac{d-c}{d+c}$
$$r=\frac{1-x^2-y^2}{(1-x)^2+y^2}\implies 
\frac{1-r}{1+r} =-x+\frac{y^2}{x-1}$$
Rearrange  
$$y^2 = (x-1)\left(x+\frac{1-r}{1+r}\right)=
\Big (x-\frac{r}{1+r}\Big )^2-\Big (\frac{1}{1+r}\Big )^2 
$$
where $u^2-v^2=(u+v)(u-v)$ is used in the last step.
