[tex]5^{2x}+7\times5^x-18=\left(5^x+9\right)\left(5^x-2\right)[/tex]
I'm assuming this is set equal to zero (just to make things easy). Then you have
[tex]\begin{cases}5^x+9=0\\5^x-2=0\end{cases}\implies\begin{cases}5^x=-9\\5^x=2\end{cases}[/tex]
The first equation has no solution, since [tex]5^x[/tex] is always positive.
Meanwhile,
[tex]5^x=2\implies \log_55^x=\log_52\implies x=\log_52[/tex]