Regularity of $k[X,Y,Z]/(Z^2 - f(X)g(Y))$ 
Let $R = k[X,Y,Z]/(Z^2 - f(X)g(Y))$, for an algebraically closed field $k$ with $\operatorname{char} k\not=2$, and $f(X)$ and $g(Y)$ have only simple roots in $k$. Determine the maximal ideals $M$ such that $R_M$ are regular local rings.

EDIT - based on very helpful hint by @Youngsu. A different answer without the Jacobian criterion by @user26857 can be found below.
There are two types of maximal ideals in $R$: $M = (X-\alpha,Y-\beta,Z)$ when $\alpha$ is a root of $f(X)$ or $\beta$ is a root of $g(Y)$, and $M=(X-\alpha,Y-\beta,Z-\sqrt{f(X)g(Y)})$ when neither $\alpha$ nor $\beta$ are roots.
Now, applying the Jacobian criterion, one must find when $$\operatorname{rank}(\frac{\partial(Z^2 - f(X)g(Y))}{\partial X} \bmod{M},\frac{\partial(Z^2 - f(X)g(Y))}{\partial Y} \bmod{M},\frac{\partial(Z^2 - f(X)g(Y))}{\partial Z} \bmod{M}) = 3 - \dim(R_M) = 1.$$
By differentiating and taking into account that only simple roots exist for $f(X)$ and $g(Y)$ one finds that only when both $\alpha$ and $\beta$ are roots of $f(X)$ and $g(Y)$ respectively the localization at $M = (X-\alpha,Y-\beta,Z)$ is not regular.
Does this work? Or have I misunderstood something? There is one detail missing also - the Jacobian criterion works if $(Z^2 - f(X)g(Y))$ is radical, right? How could I prove this?

All you have to do is to figure out when $Z^2-f(X)g(Y)\in\mathfrak m-\mathfrak m^2$.
It's obvious that $Z^2-f(X)g(Y)\in\mathfrak m$.
Taylor's theorem shows that $Z^2-f(X)g(Y)\in\mathfrak m^2$ iff its first partial derivatives are zero in $(\alpha,\beta,\sqrt{ f(\alpha)g(\beta)})$, that is, $f'(\alpha)g(\beta)=0$, $f(\alpha)g'(\beta)=0$, $f(\alpha)g(\beta)=0$.
