# Finding a certain integral basis for a quadratic extension

This is a problem in the first chapter of Dino Lorenzini's book on arithmetic geometry. Let $A$ be a PID with field of fractions $K$ and $L/K$ a quadratic extension (no separability assumption). Let $B$ be the integral closure of $A$ in $L$. Now assuming that $B$ is a f.g. $A$-module, then the problem asks to show that $B=A[b]$ for some $b\in B$.

Obviously, we know that $B$ is free of rank $2$ as an $A$-module, so there must be some integral basis $\{ b_1,b_2\}$. However, I don't see how one of these can be assumed to be $1$. Similarly, any $A$-submodule, including ideals of $B$, must be generated by at most two elements. Other things I've tried is using the fact that $B$ must have dimension $1$. However, I've failed to see how any of this could be applied.

-

Consider the quotient $B/A$. What can you say about it?