5. Let the solution set of the inequality $\frac{a x-5}{x^{2}-a}<0$ be $M$. If $3 \in M$ and $5 \notin M$, find the range of real number $a$.

Translate the above text into English, please retain the original text's line breaks and format, and output the translation result directly.
5. Solve $3 \in M \Rightarrow \frac{3 a-5}{9-a}9$ or $a<\frac{5}{3}$.
Also, $5 \notin M \Rightarrow \frac{5 a-5}{25-a} \geqslant 0 \Rightarrow 1 \leqslant a<25 \Rightarrow 1 \leqslant a<\frac{5}{3}$ or $9<a<25$.
Furthermore, when $a=25$, $\frac{25 x-5}{x^{2}-25}<0 \Rightarrow\left(x-\frac{1}{5}\right)(x-5)(x+5)<0 \Rightarrow$
$M=\left\{x \mid x<-5\right.$ or $\left.\frac{1}{5}<x<5\right\}. 5 \notin M$.
Therefore, $1 \leqslant a<\frac{5}{3}$ or $9<a \leqslant 25$.