solving equations involving exponential terms