Answer
$x = \dfrac{\log{12}}{\log{8}} \approx 3.1950$
Work Step by Step
Take the common logarithm of both sides to have:
$\log{8^{x-2}}=\log{12}$
Apply the power property of logarithms to have:
$(x-2)(\log{8}) = \log{12}$
Divide $\log{8}$ to both sides to have:
$\\x-2 = \dfrac{\log{12}}{\log{8}}$
Add 2 to both sides to have:
$\\x = \dfrac{\log{12}}{\log{8}}
\\x \approx 3.1950$