Proving if $a$ and $b$ are positive rational numbers and $\mathbb Q(\sqrt{a})=\mathbb Q(\sqrt{b})$ then $b=ac^2$ for some $c\in \mathbb Q$.
I understand that $\mathbb Q(\sqrt{a})$ is the smallest field containing $\mathbb Q \cup \{\sqrt{a}\}$ (same for $b$). So, that would imply $a=b$, correct?
For showing $a=b$:
If we let $\mathbb Q(\sqrt{a})=\alpha +\beta \sqrt{a}$ and $\mathbb Q(\sqrt{b})=\gamma +\delta \sqrt{b}$, how could we conclude $a=b$? Or, is there a easier way to represent $\mathbb Q(\sqrt{a})$ and $\mathbb Q(\sqrt{b})$?
After proving $a=b$, would it suffice to conclude:
$b=ac^2$. Because if $b=a$ then substitution yields $a=ac^2$ and $1=c^2$. Thus, $c=1\in \mathbb Q$.
If this idea is correct, is there anything else that needs to be added to write it as a formal proof?
Note that $\sqrt{a}\in\mathbb{Q}\iff\sqrt{b}\in\mathbb{Q}$, and in this case the claim is trivial, so assume that $\sqrt{a},\sqrt{b}\notin\mathbb{Q}$ to avoid trivial cases.
Since $\sqrt{b}\in\mathbb{Q}(\sqrt{a})$, you can write $\sqrt{b}=d+c\sqrt{a}$ for $d,c\in\mathbb{Q}$. This implies $$ b=d^2+2dc\sqrt{a}+c^2a. $$
Note that $c\neq 0$, else $b=d^2$, implying $\sqrt{b}=d\in\mathbb{Q}$. It suffices to show $d=0$. If not, solving for $\sqrt{a}$ shows $\sqrt{a}\in\mathbb{Q}$, a contradiction.