prove $K(B)\cong K(A)[z]/(z^2-a)$ Let $A$ be a UFD, and $z^2 - a$ be a irreducible polynomial in $A[z]$ such that $a$ has no repeated prime factor, let $B = A[z]/(z^2-a)$ then it's an integral domain (since $z-a^2$ prime in UFD).
I was trying to show $$K(B) \cong K(A)[z]/(z^2-a)$$
where $K(-)$ means taking the fractional field;

My attempt
Easy to see $B \subset K(A)[z]/(z^2-a)$, then I need to prove $(z^2 -a)$ is also irreducible in $K(A)[z]$.Hence $K(B)\subset K(A)[z]/(z^2-a)$ by the universal property of fractional field.
Finally needs to show every element in $r/s+(m/n)z\in K(A)[z]/(z^2-a)$  lies in $K(B)$ also.
Which is clear since each element in $K(B)$ has the form $\frac{a + bz}{c+dz}$ with $a,b,c,d \in A$ taking $a = nr,b = ms,c = sn, d = 0$ yield the result.
So I have a question that can not work out yet:
(1) why $z^2-a$ is irreducible in $K(A)[z]$, I try to use degree 2 irreducible criterion showing it does not has root in it
 A: (1) This is essentially Gauss's Lemma: if $R$ is a UFD with fraction field $F$, then a non-constant polynomial $f$ is irreducible in $R[x]$ if and only if it is primitive (i.e. the coefficients don't share a common factor) and irreducible in $F[x]$. In your case, one can also prove it directly: suppose $z^2-a$ is reducible in $K(A)[z]$. Then there exists $b/c\in K(A)$ with $b,c$ sharing no common factor such that $(z^2-a)=(z-b/c)(z+b/c)$. Also, write $a=de^2$ with $d$ squarefree. The we obtain $de^2c^2=b^2$. As $d|b^2$ and $d$ is squarefree we obtain $d|b$, and thus we may write $b=df$ for some $f$. But then $e^2c^2=df^2$, so $d|ec$. As $b,c$ don't share a common factor and $d|b$ we must have $d|e$, so write $e=gd$. Then it follows that $dg^2c^2=f^2$. We may repeat the argument indefinitely, and thus obtain that $d^n|b$ for all $n>0$, which implies that $d$ is a unit. It then follows from $de^2c^2=b^2$ that $b|e$, and thus $d^{-1}=((e/b)c)^2$ with $(e/b)c\in R$. Hence $d^{-1}$, and thus also $d$, is a square in $R$. But thus we proved that $z^2-a$ is reducible in $A[z]$, contrary to our assumption.
