Solve equations with different bases (#510)

Solve equations with different bases (#510)

Use change of base or rewrite with common base when possible.