This is a middle step of my solution to a problem.But I don't know if this claim is right.

Let $a,b\in \mathbb Q$, and $x\in \mathbb Z$ be a square free integer. I want to show if $\mathbb Q(\sqrt {a^2-b^2 x})=\mathbb Q(\sqrt x).$Then $x$ is the sum of two rational squares.

Hence there exists some $c\in\mathbb Q$, such that $a^2x-b^2x^2=c^2$. So I have to work out the equation $a^2x-b^2x^2=c^2$, however I am not sure if it is true that one can always write $x=m^2+n^2$ for some $m,n\in \mathbb Q$?


Let $a,b,c\in\Bbb{Q}$ and $x\in\Bbb{Z}$ squarefree such that $$a^2x-b^2x^2=c^2.$$ Clearing denominators, we may assume without loss of generality that $a,b,c\in\Bbb{Z}$. Then we see that $x$ divides $c$, say $c=xw$, and in turn $x$ divides $a$, say $a=xu$, so that $$u^2x=b^2+w^2.$$ This shows that $u^2x$ is a sum of two integer squares, where $u$ and $x$ are both integers. It now follows immediately from the characterization of integers that are sums of two squares, that also $x$ is a sum of two integer squares.