the question
Show that if $a$ and $q$ are natural numbers and the number $(a+\sqrt{q})(a+\sqrt{q+1})$ is rational, then $q=0$.
the idea
for the number to be rational both members have to be rational (*)
because a is natural, it means that $\sqrt{q}$ and $\sqrt{q+1}$ should both be perfect squares, but they are also consecutive
$\sqrt{q}+1=k^2+1$ => $\sqrt{q+1}=k^2+2k+1$
The equality would happen only id $2k=0 => k=0 => q=0$
Im not sure of the part I noted (*), because I think I should also demonstrate this fact, but I don't know how. Hope one of you can tell me if my idea is right and how can I improve my answer! Thank you!
If $a \neq 0$:
FTSOC, assume both $\sqrt{q}$ and $\sqrt{a+1}$ are irrational (if one is rational, then so is the other). Then $a \neq \sqrt q$ and: $$(a+\sqrt{q})(a+\sqrt{q+1}) \in \Bbb Q$$ $$\iff a(\sqrt q+\sqrt{q+1})+\sqrt{q^2+q} \in \Bbb Q \tag{1}\label{1}$$ Also: $$\frac{a-\sqrt{q}}{a-\sqrt q}\cdot (a+\sqrt{q})(a+\sqrt{q+1}) \in \Bbb Q$$ $$\iff \frac{a+\sqrt{q+1}}{a-\sqrt q} \in \Bbb Q$$ $$\iff \frac{(a-\sqrt q)+\sqrt q+\sqrt{q+1}}{a-\sqrt q} \in \Bbb Q$$ $$\iff \frac{\sqrt q+\sqrt{q+1}}{a-\sqrt q} \in \Bbb Q$$ $$\iff \frac{1}{(a-\sqrt q)(\sqrt{q+1}-\sqrt q)} \in \Bbb Q$$ $$\iff a\sqrt{q+1}+q - a\sqrt{q}-\sqrt{q^2+q} \in \Bbb Q$$ $$\iff 2a\sqrt{q+1} - [a(\sqrt q+\sqrt{q+1})+\sqrt{q^2+q}] \in \Bbb Q$$ From $\eqref{1}$, we have $$\iff 2a\sqrt{q+1} \in \Bbb Q$$ $$\iff \color{red}{\sqrt{q+1} \in \Bbb Q}$$
If $a=0$, then $\sqrt{q^2+q}$ is rational, and this implies it is an integer. But $q^2 \leq q^2+q<q^2+2q+1 \implies q^2+q = q^2 \implies q = 0$.