Let $A$ be a Dedekind domain and let $B:=A[X]/(f(X))$ in such a way that $B$ is a domain. Let $\phi\colon A\longrightarrow B$ the canonical ring homomorphism, then $f$ induces a map between spectra $\phi^\ast\colon \mathsf{Spec} \: B\longrightarrow \mathsf{Spec} \: A$. Given a maximal ideal $\mathfrak{p}\in \mathsf{Spec} \: A$ and $\mathfrak{q}\in(\phi^\ast)^{-1}(\mathfrak{p})$ I have to find a necessarry and sufficient condition such that $B_\mathfrak{q}$ is regular.
Any help or reference for exercise of this type is really appreciated.