<s>[INST] How does $b^2=a^2-ab$ lead to $\frac{b}{a}=\frac{-1+\sqrt 5}{2}$? So basically, I came across this particular solution of a problem that starts with

$$\frac {b}{a-b}=\frac ab \quad\implies\quad b^2=a^2-ab \quad\implies\quad\frac ba=\frac{-1+\sqrt 5}{2}$$

Can someone please explain how the $\frac ba=\frac{-1+\sqrt 5}{2}$ part came about?
The $\frac {b}{a-b}=\frac ab$ part is given as part of the problem.
 [/INST] Dividing $b^2=a^2-ab$ by $a^2$ yields
$$
\left(\frac b a\right)^2 = 1-\frac b a.
$$
Let $z=\tfrac b a$ to get the quadratic equation $z^2=1-z$ or equivalently
$$
z^2+z-1 = 0.
$$
Solve this using your favorite method of solving a quadratic equation to obtain
$$
z = \frac { -1 \pm \sqrt{5} } 2.
$$
</s>