Don't let the fraction get to you!

When you take the log of a fraction, the value is negative.

So it is ok to right the solution as $\displaystyle x=\frac{\log\frac{8}{35}}{\log 2}$. Now by change of base formula $\displaystyle \log_ab=\frac{\log b}{\log a}$, we can rewrite our solution as $\displaystyle x=\log_2\left(\frac{8}{35}\right)$.

Now when you plug it into verify the solution, we keep in mind that $\displaystyle a^{\log_ab}=b$:

$\displaystyle 4\left(2^{\log_2\left(\frac{8}{35}\right)}\right)+ 31\left(2^{\log_2\left(\frac{8}{35}\right)}\right)-8=4\left(\frac{8}{35}\right)+31\left(\frac{8}{35}\ right)-8=35\left(\frac{8}{35}\right)-8=8-8=0$.

So it shows that $\displaystyle x=\frac{\log\frac{8}{35}}{\log 2}=\log_2\left(\frac{8}{35}\right)$ is the solution to our equation.