This there an associated function here? Might be helpful.
Anyhow. You have a and b and the midpoint x = (a+b)/2 where a < x < b.
So you find f(a), f(x), f(b). Look at there signs.
Lets say f(a) = +ve, f(x) = -ve, f(b) = -ve.
Always point the new interval to be the 2 functions that differ in signs. In this case your new interval will be (a,x) not (x,b)
Do you follow?