How to solve for a variable in the exponent