Example 9 For what value of $a$ does the inequality
$\log _{\frac{1}{a}}\left(\sqrt{x^{2}+a x+5}+1\right) \cdot \log _{5}\left(x^{2}+a x+6\right)+\log _{a} 3 \geqslant 0$ have exactly one solution.
For the logarithmic equation, the bases of the logarithms are different, and the arguments contain radicals. We can consider changing the base and introducing a substitution to simplify the original inequality, and then solve it.

Solution: It is easy to see that $a>0, a \neq 1$. Let $u=x^{2}+a x+5$, the original inequality can be transformed into
$$
\frac{\log _{3}(\sqrt{u}+1)}{-\log _{3} a} \cdot \log _{5}(u+1)+\frac{1}{\log _{3} a} \geqslant 0 .
$$
(1) When $0<a<1$, the original inequality becomes $\log _{3}(\sqrt{u}+1) \cdot \log _{5}(u+1) \geqslant 1$. Since $f(4)=1$, (2) is equivalent to $u \geqslant 4$, i.e., $x^{2}+a x+5 \geqslant 4$. This inequality always has solutions for $x$.

(2) When $a>1$, the original inequality becomes $\log _{3}(\sqrt{u}+1) \cdot \log _{5}(u+1) \leqslant 1$. Since $f(4)=1$, (2) is equivalent to $0 \leqslant u \leqslant 4$, i.e., $0 \leqslant x^{2}+a x+5 \leqslant 4$. From the above, the inequality $0 \leqslant x^{2}+a x+5 \leqslant 4$ has a unique solution (i.e., the two roots are the same) only when $x^{2}+a x+5=4$. By $\Delta=a^{2}-4=0$, we get $a=2$. At this point, the inequality $0 \leqslant x^{2}+a x+5 \leqslant 4$ has the solution $x=-1$.

In summary, the original inequality has a unique solution when $a=2$.