Given two irreducible polynomials $f(x) = x^2+a, g(x) = x^2+b \in \Bbb Q [x]$, the task is to prove that splitting fields of $f$ and $g$ ($\Bbb Q[\sqrt{-a}]$ and $\Bbb Q[\sqrt{-b}]$ actually) are isomorphic iff $\frac ab = q^2$ for some $q\in \Bbb Q$.
I have some thoughts about going left direction but I can't write them right. Actually my guess is that $\sqrt{-a}$ and $\sqrt{-b}$ got both the same irrational or complex part and are equal up to rational factor, but it could be more general I guess.
I appreciate your help, or some kind of hint. Thank you in advance!