I came across this problem and have to find four roots of this equation. Direct multiplication was of no help and factorizing it is a mess.
I tried to factor it using $a^2+b^2=(a+ib)(a-ib) $ but was of no help.
$$x^2 + (\frac{ax}{x+a})^2= 3a^2$$
Can anyone through in some ideas?
Wolog $a\neq 0.$ If we substitute $x=ay$, we get completely rid of the $a$: $$ (ay)^2+\left(\frac{a^2y}{ay+a}\right)^2=3a^2 \;\;\Longleftrightarrow \;\; y^2+\left(\frac{ay}{ay+a}\right)^2=3 \;\;\Longleftrightarrow \;\; y^2+\left(\frac{y}{y+1}\right)^2=3 $$ Now we multiply this with $(y+1)^2$ and we get $$ y^4+2y^3-y^2-6y-3 =0 $$ Now we can cheat a little bit and use e.g. an online solver for roots of polynomials, and we see that the golden ratio $1,618\ldots\ $ seems to be one of the roots, so we can try the factor $y^2-y-1$. And indeed we get $$ y^4+2y^3-y^2-6y-3 =0 \;\;\Longleftrightarrow \;\; (y^2-y-1)(y^2+3y+3)=0 $$ Now it is easy to get the $y$. From $x=ay$, we finally get the $x$.