Is the 12 being raised to the power of "x" or the power of (x-2) ??
I'll answerthe question asked but you do need to use brackets AllSmilesAlways to make your meaning clear.
$$\begin{array}{rll}
12^x-2&=&20\\\\
12^x&=&22\\\\
log(12^x)&=&log22\\\\
xlog12&=&log22\\\\
x&=\frac{log22}{log12}\\\\
x&\approx &1.244 \mbox{ correct to 3 decimal places}
\end{array}$$
Can someone please tell me why this did not align properly?
\begin{array}{rll}
12^x-2&=&20\\\\
12^x&=&22\\\\
log(12^x)&=&log22\\\\
xlog12&=&log22\\\\
x&=&\frac{log22}{log12}\\\\
x&\approx &1.244 \mbox{ correct to 3 decimal places}
\end{array}