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.

So we start here:
$$b^2 = a^2 - ab$$
(You can get there just by cross-multiplying in your original equation, the one with the fractions.) Move everything to the left-hand side first:
$$b^2 + ab - a^2 = 0$$
Divide both sides by $a^2$:
$$\frac{b^2}{a^2} + \frac{b}{a}  - 1 = 0$$
To make life easier, define the variable $x=b/a$:
$$x^2 + x - 1 =0$$
This is a quadratic equation in $x$, which is easily solved via the quadratic formula:
$$x = \frac{-(1) \pm \sqrt{(1)^2 - 4(1)(-1)}}{2(1)} = \frac{-1 \pm \sqrt{5}}{2}$$
But since $x = b/a$, then we have the desired
$$\frac b a = \frac{-1 \pm \sqrt{5}}{2}$$
(I'm not sure why what you were given neglects the negative solution of $(-1-\sqrt 5)/2$, as far as I know it's valid.)
