Prove that if $a,b \in \mathbb{Q}$, and $a+b \in \mathbb{Z}$, $2ab \in \mathbb{Z}\,$ [and $\color{#0a0}{a^2+b^2} \in \mathbb{Z}$] , then $a, b \in \mathbb{Z}.$
[N.B. the original question did not include the hypothesis $\,\color{#0a0}{a^2+b^2}\in \Bbb Z.\,$ This is redundant, since it is equivalent to $\,2ab\in\Bbb Z,\,$ assuming $\,a+b\in\Bbb Z,\,$ by using $\,(a+b)^2 = \color{#0a0}{a^2+b^2}+ 2ab\ $ -Bill D.]
I used the Rational root theorem on polynomial $x^2 - (a+b)x + 2ab$
All possible roots of the polynomial are divisors of 2ab and are integers. But then using quadratic formula $x_{1,2}=a+b\pm\frac{\sqrt{(a+b)^2-8ab}}{2}$ Then, because roots are integers $(a+b)^2-8ab$ has to be an even perfect square, I do not know what to do now.