Q:

Find the values of $x$ in terms of $a$ in $x^2+\frac{(ax)^2} {(x+a)^2} =3a^2$

The question is as follows.

Find the values of $x$ in terms of $a$ in
$x^2+\dfrac{(ax)^2}{(x+a)^2} =3a^2 $

My solution:
Multiply both sides by $(x+a)^2$ and expand. On rearranging we get
$x^4+2ax^3-a^2x^2-6a^3x-3a^4=0$
Now dividing by $a^4$ we and taking $\dfrac{x}{a}=y$, we get
$y^4+2y^3-y^2-6y^3-3=0$
Now we can write the above equation as
$(y^2+ay+b)(y^2+cy+d)=0$
Now expanding it and comparing coefficient with the equation we get
$a=-1;b=-1;c=3;d=3$
So we get
$(y^2-y-1)(y^2 +3y+3)=0$
The second bracket has no real roots and by solving 1st bracket we get
$y=\dfrac{x}{a} =\dfrac{1\pm\sqrt5}{2}$
So $x=\dfrac{a(1\pm\sqrt5) }{2}$
My question is
1: As you can see the method is long and tedious, is there any other or elegant way to solve it?
2:Can any step in my solution or the solution itself be improved upon or be replaced by another easier step (like but not limited to factorising the equation we got in $y$ directly into two quadratics or solving the quatic directly)
Thanks!
I got the question from a preparatory book for olympiads.

A:

It's $$x^2+\frac{a^2x^2}{(x+a)^2}-\frac{2ax^2}{a+x}+\frac{2ax^2}{a+x}=3a^2$$ or
$$\left(x-\frac{ax}{a+x}\right)^2+\frac{2ax^2}{a+x}=3a^2$$ or
$$\left(\frac{x^2}{a+x}\right)^2+\frac{2ax^2}{a+x}-3a^2=0$$ or
$$\left(\frac{x^2}{a+x}\right)^2+\frac{2ax^2}{a+x}+a^2-a^2-3a^2=0$$
 or
$$\left(\frac{x^2}{a+x}+a\right)^2-(2a)^2=0$$
or
$$\left(\frac{x^2}{a+x}-a\right)\left(\frac{x^2}{a+x}+3a\right)=0$$ and the rest is smooth:
The domain gives $x\neq-a$, which gives $a\neq0.$
Thus, $$x^2+3ax+3a^2=\left(x+\frac{3a}{2}\right)^2+\frac{3a^2}{4}>0,$$ which says that the right polynomial does not give roots.
Also, $$x^2-ax-a^2=0$$ gives
$$\left\{\frac{a(1+\sqrt5)}{2},\frac{a(1-\sqrt5)}{2}\right\}.$$
To solve an equation with parameter says to solve this equation for any values of the parameter.
Id est, we got the following answer.
If $a=0$, so $\oslash$;
if $a\neq0$, so $\left\{\frac{a(1+\sqrt5)}{2},\frac{a(1-\sqrt5)}{2}\right\}.$

