# Solve for x with exact values

I am super confused how does this step end up with this?

Then this is the working, I dont understand the second step please help me to show the missing step any Law of Logarithms at work here?

-

In the second step, both sides of the equation are multiplied by $e^{3x}$. In the third step, $2 \cdot e^{3x}$ is subtracted from both sides of the equation. It can be rephrased as a quadratic equation in $y$ where $y = e^{-3x}$ and $y \in \mathbb{R^{+}}$.
With the substitution, $y=e^{3x}$ (forcing $y>0$), this becomes $$\begin{array}{rrll} &y-8/y&=2&(\text{substitution})\\ \therefore&y^2-2y-8&=0&(\text{algebra})\\ \therefore&y&=1\pm3&(\href{http://en.wikipedia.org/wiki/Quadratic_equation#Quadratic_formula}{\text{quadratic formula}}) \end{array}$$ Therefore, $e^{3x}=4\Rightarrow x=\frac23\log(2)$.