how to solve logarithms