how to solve equations with logs