Assume $n=\frac pq$ with $\gcd(p,q)=1$ is a solution, i.e. $n^2+5=a^2,\quad n^2+10=b^2\quad\text{with }a,b\in\mathbb Q.$ Also assume that $n$ is a solution with minimal $q$.
Then we have $\tag1p^2+5q^2=(qa)^2,\quad p^2 +10q^2=(qb)^2$ that is $c:=qa$ and $d:=qb$ are integers (because the square root of an integer is either integer or irrational). Any prime (including $5$!) dividing both $c$ and $p$ would also divide $q$, hence $\gcd(c,p)=1$. Similarly $\gcd(c,q)=\gcd(d,p)=\gcd(d,q)=1$. From $(1)$ we find $10q^2=2(c^2-p^2)=(d^2-p^2)$, hence $2c^2=d^2+p^2$ and finally $(d+p)^2+(d-p)^2=2d^2+2dp+p^2+d^2-2dp+p^2=2(d^2+p^2)=(2c)^2 $ so that $(d-p,d+p,2c)$ is a pythagorean triple. Note that $\gcd(d-p,d+p,2c)$ divides $\gcd(2p,2c)=2$, hence either $(d-p,d+p,2c)$ is primitive or we have $p\equiv d\pmod 2$ and $\left(\frac{d-p}2,\frac{d+p}2,c\right)$ is a primitive pythagorean triple (PPT). The first variant is impossible because the hypothenuse in a PPT is always odd. From $d\equiv p\pmod 2$ and $\gcd(d,p)=1$ we see that $d,p$ are both odd and either $\frac{d+p}2$ or $\frac{d-p}2$ is even.
The PPTs are well-known: If $u,v$ are coprime natural numbers of different parity, then we have $(u^2-v^2,2uv,u^2+v^2)$ or $(2uv,u^2-v^2,u^2+v^2)$, depending on where we want the even number. This gives us $p=\frac{d+p}2-\frac{d-p}2=\pm(u^2-2uv-v^2)=\pm((u-v)^2-2v^2).$ $c=u^2+v^2$ $q^2=\frac15(c^2-p^2)=\frac{4uv(u+v)(u-v)}5$ From coprimeness, we conclude that one of the following cases occurs:
- $(u-v,v,u)$ is a PPT and $\frac{u+v}5$ a square. But in such a PPT we have that $u+v$ is either square or twice a square, contradiction.
- $(u,v,u+v)$ is a PPT and $\frac{u-v}5$ a square. (to be continued)
- $u,u-v,u+v$ and $\frac v5$ are squares. This makes $(p,q,c,d)=(\sqrt{u-v},\sqrt{\frac v5},\sqrt u,\sqrt{u+v})$ a solution of $(1)$, contradicting the minimality of $q$.
- $v,u-v,u+v$ and $\frac u5$ are squares. (to be continued)