When both sides can't be written with a common base, logarithms bring the exponent down where you can reach it. You will use the change-of-base idea and $e$.
Key idea
Isolate the exponential part ($b^{\text{something}}$ alone on one side). Take $\ln$ (or $\log$) of both sides. The power rule brings the exponent down: $\ln(b^{u}) = u\ln b$. Solve the resulting linear equation; leave $\ln$ values as exact numbers.
Why it works
Logs are one-to-one, so taking the log of both sides keeps the equation true and reversible. The power rule is the key move: the unknown was in an exponent, and now it multiplies a constant like $\ln 2 \approx 0.693$. After that it is ordinary algebra.
Worked examples
Worked example: Isolate, then take logs
Solve $5 \cdot 3^{x} = 40$.
- Divide by 5: $3^x = 8$.
- Take $\ln$: $x\ln 3 = \ln 8$.
- $x = \frac{\ln 8}{\ln 3} \approx 1.893$.
Answer: $x = \frac{\ln 8}{\ln 3}$
Worked example: Base $e$
Solve $e^{2x} = 7$.
- $\ln$ undoes $e$: $2x = \ln 7$.
Answer: $x = \frac{\ln 7}{2} \approx 0.973$
Worked example: Unknowns on both sides
Solve $2^{x} = 3^{x - 1}$.
- Take $\ln$: $x\ln 2 = (x - 1)\ln 3 = x\ln 3 - \ln 3$.
- Collect: $x\ln 2 - x\ln 3 = -\ln 3$, so $x(\ln 3 - \ln 2) = \ln 3$.
Answer: $x = \frac{\ln 3}{\ln 3 - \ln 2} \approx 2.710$
Common mistake
Combining the coefficient with the base, as if $3 \cdot 2^x$ were $6^x$. The exponent belongs to the 2 only. Divide by 3 first: $3 \cdot 2^x = 48$ gives $2^x = 16$, so $x = 4$. ($6^x = 48$ would give about $2.16$, a wrong answer.) Check by substituting: $3 \cdot 2^4 = 48$.