\({3^{x-1}}-{3^{x-2}} = 18\,\,\,\,\,\,\, \Leftrightarrow \,\,\,\,\,\,\,\dfrac{{{3^x}}}{3}-\dfrac{{{3^x}}}{{{3^2}}} = 18\,\,\,\,\,\,\, \Leftrightarrow \,\,\,\,\,\,\,{3^x} \cdot \left( {\dfrac{1}{3}-\dfrac{1}{9}} \right) = 18\,\,\,\,\,\,\, \Leftrightarrow \,\,\,\,\,\,\,\)
\( \Leftrightarrow \,\,\,\,\,\,\,{3^x} \cdot \dfrac{2}{9} = 18\,\,\,\,\,\,\, \Leftrightarrow \,\,\,\,\,\,\,{3^x} = 81\,\,\,\,\,\,\, \Leftrightarrow \,\,\,\,\,\,\,{3^x} = {3^4}\,\,\,\,\,\,\, \Leftrightarrow \,\,\,\,\,\,\,x = 4.\)
Ответ: 4.