solving Algebraic Equation involving Exponents