# If $p, q$ are prime integers, then $\mathbb{Q}(\sqrt{p})$ is not isomorphic (as a field) to $\mathbb{Q}(\sqrt{q})$ [duplicate]

My strategy is something like this: suppose $$\phi: \mathbb{Q}(\sqrt{p}) \to \mathbb{Q}(\sqrt{q})$$ is a isomophism such that $$\phi(x) = x$$ for all $$x \in \mathbb{Q}$$ and let $$\phi(\sqrt{p}) = a + b \sqrt{q}$$. Then $$p = \phi(p) = \phi(\sqrt{p}^2) = \phi(\sqrt{p})^2 = (a + b \sqrt{q})^2 = a^2 + 2ab \sqrt{q} + b^2 p$$. I feel like '$$\phi(x) = x$$ for all $$x \in \mathbb{Q}$$' can be proved from the supposition that $$\phi: \mathbb{Q}(\sqrt{p}) \to \mathbb{Q}(\sqrt{q})$$ is an isomorphism, but I am not sure how to prove it. Can anyone help me?

Hint $$\phi(1)=1$$ implies $$\phi(n)=n$$.. Now use $$\phi(mx)=m \phi(x)$$ to deduce that $$\phi(x)=x$$ for all $$x \in \mathbb Q$$.
Also note that $$\phi(\sqrt{p})$$ has to be a root of $$X^2-p=0$$, and the roots of this are...