Using numbers
$x-1$ and $x+1$ are $2$ apart
Powers of $2$ (two columns so that numbers above each other are $2$ powers apart):
$2$ $4$
$8$ $16$ $4$ and $16$ are $12$ apart
$32$ $64$ numbers are getting too far apart
$16-4=12$
$2^4-2^2=12$
$x=3$
Using index laws
$2^{x+1}=2^x\times2^1=2^x\times2$ and $2^{x-1}=2^x\times2^{-1}=2^x\times\frac12$.
Substitute then factorise: $$\begin{align} 2^{x+1}-2^{x-1} =&12\\
\Rightarrow2^x\times2-2^x\times\tfrac12=&12\\
\Rightarrow 2^x\left(2-\tfrac12\right)=&12\\
\Rightarrow 2^x\times\tfrac32=&12\\
\Rightarrow 2^x\times3=&12\times2\\
\Rightarrow 2^x=&24\div3\\
\Rightarrow 2^x=&8\end{align}$$ So $x=3$, since $2^3=8$.