For a $a\in\mathbb Z$, if $\sqrt{a}\in\mathbb Q$, then $\sqrt{a}\in\mathbb Z$. Main idea of this question is this.
Now we'll denote the integer part of a real number $x$ with $[x]$. So naturally we have $$x=[x]+\{x\}$$So if $\{ x\} =\{ x^2\}$, then we have $x-[x]=x^2-[x^2]\rightarrow x^2-x=[x^2]-[x]=c\in\mathbb Z$.
So we have $x^2=x+c$, $c\in\mathbb Z$. Now same thing can be applied to the pair $(x,x^n)$, so we would get $x^n-x\in\mathbb Z$.
But since we have $x^2=x+c$, we can replace $x^2$ by $x+c$ wherever we want. Looking back to $x^n-x$, we see that we can reduce its degree by applying that so doing this until we have no other choice but to stop, the expression $x^n-x$ would have written in a form like $bx+d$, $b,d\in\mathbb Z$, since all coefficents of $x^n-x$ always will be integers. So what I am saying is there must be $b,d\in\mathbb Z$, such that $$x^n-x=bx+d\in\mathbb Z$$$bx+d,b,d\in\mathbb Z\Rightarrow x\in\mathbb Q$.
Also going back, we can solve $x^2-x-c=0$, to get exact value of $x$, and it is $$\frac{1\pm\sqrt{1+4c}}{2}$$This is a rational number, so $\sqrt{1+4c}$ is a rational number but our first observation tells us it must be an integer too. $1+4c$ is an odd number so $\sqrt{1+4c}$ is odd too. So
$$2\mid 1+\sqrt{4c+1}, 2x=1+\sqrt{1+4c}$$These basicly tell us that $x$ is an integer.