Solve logarithms with different bases