18. $3 \log _{a^{2} x} x+\frac{1}{2} \log _{\sqrt{a}} x=2$.
18. Transitioning to logarithms with base $x$, we obtain the equation

$$
4 \log _{x}^{2} a-7 \log _{x} a+3=0 . \quad \text { Hence } x_{1}=a, x_{2}=a^{\frac{4}{3}}
$$