We do this:
From (a-b)^2=ab, we get: a^2-3ab+b^2=0 (1)
We know that none of a and b is 0.
Let a/b = x, (1) becomes x^2-3x+1=0 by dividing both sides by b^2.
This is a quadratic equation. By the Vieta's Theorem, the sum of the roots is -(-3) = 3.
3 is the answer.
Hope this will help.