I assume the equation is supposed to be
[tex]3^{x+2}=8^{x-1}[/tex]
Then we can write
[tex]9\cdot3^x=\dfrac18\cdot8^x\implies\left(\dfrac38\right)^x=\dfrac1{72}[/tex]
Take the logarithm of base 3/8 on both sides:
[tex]\log_{3/8}\left(\dfrac38\right)^x=\log_{3/8}\dfrac1{72}[/tex]
[tex]\implies x\log_{3/8}\dfrac38=-\log_{3/8}72[/tex]
[tex]\implies x=-\log_{3/8}72[/tex]
- - -
If the equation is actually [tex]3^x+2=8^x-1[/tex], I'm afraid it cannot be solved exactly.