How to solve exponential equations with a different base