5. Let $g(x)=\left(x+\log _{4}|a|\right)\left(x+\log _{|a|} 4\right), h(x)=x^{2}+10 \cdot 2^{a} x+a^{2}-3$ and $d_{h}(a)$ - the quarter of the discriminant of the quadratic trinomial $h(x)$. The inequality holds for all $x$ if and only if:

a) the roots of $g(x)$ coincide, and the roots of $h(x)$ either do not exist or coincide; b) the pair of roots of $g(x)$ coincides with the pair of roots of $h(x)$.

The conditions of point a) mean: $\log _{4}|a|=\log _{|a|} 4, d_{h}(a) \leqslant 0$. Solving the equation, we get $\log _{4}|a|=\log _{|a|} 4 \Leftrightarrow\left(\log _{4}|a|\right)^{2}=1$.

If $\log _{4}|a|=1 \Leftrightarrow|a|=4$, then either $a=4$ and $d_{h}(4)=(5 \cdot 16)^{2}-13>0$, or $a=-4$ and $d_{h}(-4)=(5 / 16)^{2}-13<0$.

If $\log _{4}|a|=-1 \Leftrightarrow|a|=\frac{1}{4}$, then the constant term of $h(x)$ is $a^{2}-3=$ $\frac{1}{16}-3=-\frac{47}{16}<0$, so $h(x)$ has two distinct roots.

The conditions of point b) mean that $h(x)=g(x)$. Therefore

$$
\left\{\begin{array}{l}
a^{2}-3=\log _{4}|a| \cdot \log _{|a|} 4 \equiv 1 \\
10 \cdot 2^{a}=\log _{4}|a|+\log _{|a|} 4
\end{array}\right.
$$

The first equation of the system means that $a^{2}-3=1 \Leftrightarrow|a|=2$, and then

$$
\log _{4}|a|+\log _{|a|} 4=10 \cdot 2^{a}=\frac{5}{2}
$$

The last equality holds only when $a=-2$.
Answer: $a=-4 ; a=-2$. Answer to option $5-2: a=4 ; a=2$.