Request your help to trap error, trying to covert an ellipse equation form polar to rectangular form, canonical.
$$ \dfrac{p}{r} =1 - \epsilon \cos \theta \tag{1}$$
$$ p = r - \epsilon x \tag{2} $$ squaring $$(p+ \epsilon x)^2 = r^2 = x^2 + y^2 \tag{3} $$
Bring all quantities to RHS
$$ x^2 ( 1- \epsilon ^2) - 2 p \epsilon - p^2 + y^2= 0 \tag{4}$$
( an error occurred here, corrected)
$$ x^2 - \dfrac{2 p \epsilon }{1-\epsilon ^2 } - \dfrac{p^2}{1- \epsilon^2 } x + \dfrac {y^2}{1-\epsilon ^2 } =0 \tag{5}$$
Using standard conics notation $$ p= b^2/a ; \, \epsilon^2 = 1 -b^2/a^2 ; \, c^2 = a^2-b^2 ; \tag{6} $$
$$\dfrac{2 p \epsilon }{1-\epsilon ^2 } =c ; \,\, \dfrac{p^2}{( 1-\epsilon^2)} = b^2 \tag{7} $$
$$ x^2 - 2 c x - b^2 + a^2 y^2 /b^2 =0 \tag{8} $$
To shift to Cartesian coordinates x-shift $ x-x_1 =c $
$$ ( c+ x_1)^2 - 2 c ( c+ x_1) + a^2 y^2/b^2 = b^2 \tag{9} $$
Expand and simplify
$$ {\left(x_1/a \right)}^2 + {\left(y/b \right)}^2 =1 \tag{10} $$
On your 5th step, when you divide by $1-\epsilon^2$, you forgot to divide the last term $y^2$. Then $1-\epsilon^2 = b^2/a^2$, by (6). The last term on the left become $a^2y^2/b^2$.