6. Given the asymptotes of a hyperbola are $x \pm 2 y=0$, and the minimum distance from a moving point $P$ on the hyperbola to point $A(5,0)$ is $\sqrt{6}$. Then the equation of the hyperbola is $\qquad$ .
6. $x^{2}-4 y^{2}=(5+\sqrt{6})^{2}$ and $4 y^{2}-x^{2}=4$.

Let the hyperbola equation be $x^{2}-4 y^{2}=\lambda(\lambda \neq 0)$, and the moving point $P(x, y)$. Then
$$
|P A|^{2}=(x-5)^{2}+y^{2}=(x-5)^{2}+\frac{1}{4}\left(x^{2}-\lambda\right)=\frac{5}{4}(x-4)^{2}+5-\frac{\lambda}{4} \text {. }
$$
(1) When $\lambda>0$, $x \geqslant \sqrt{\lambda}$.
When $\sqrt{\lambda} \leqslant 4$, $|P A|_{\min }=\sqrt{5-\frac{\lambda}{4}}$. When $\sqrt{\lambda} > 4$, $|P A|_{\min }=\sqrt{\frac{5}{4}(\sqrt{\lambda}-4)^{2}+5-\frac{\lambda}{4}}=|\sqrt{\lambda}-5|$. Let $|\sqrt{\lambda}-5|=\sqrt{6}$, solving gives $\sqrt{\lambda}=5+\sqrt{6}$, at this time, the hyperbola equation is $x^{2}-4 y^{2}=(5+\sqrt{6})^{2}$.
(2) When $\lambda<0$, $x \in \mathbf{R},|P A|_{\min }=\sqrt{5-\frac{\lambda}{4}}$.
Let $\sqrt{5-\frac{\lambda}{4}}=\sqrt{6}$, solving gives $\lambda=-4$, at this time, the hyperbola equation is $4 y^{2}-x^{2}=4$.