At this point, either f= 0 or we can divide both sides by f.Correct!
But bear in mind that we are asked to find the real values of $f$. So now we have the quadratic equation in terms of $f$, i.e.
$-2f = 5f^2$
do you know how to solve this quadratic equation for $f$?