162. $7^{x}-3 \cdot 7^{x-1}+7^{x+1}=371$.

Translate the above text into English, keeping the original text's line breaks and format, and output the translation result directly.

162. $7^{x}-3 \cdot 7^{x-1}+7^{x+1}=371$.
Solution. The least exponent is $x-1$; therefore, we factor out $7^{x-1}$:

$$
\begin{gathered}
7^{x-1} \cdot\left(7^{1}-3 \cdot 1+7^{12}\right)=371 ; 7^{x-1}(7-3+49)=371 \\
7^{x-1} \cdot 53=371 ; 7^{x-1}=7 ; x-1=1 ; x=2
\end{gathered}
$$