Let $A\to B$ be a ring map of Noetherian commutative unital rings. Let $\mathfrak{p}\subseteq A$ and $\mathfrak{q}\subseteq B$ be primes such that $\mathfrak{q}\cap A=\mathfrak{p}$. I wonder whether the following criterion for smoothness at $\mathfrak{q}\subseteq B$ is valid
If $\hat{A_{\mathfrak{p}}}\to \hat{B_{\mathfrak{q}}}$ is a formal power series, i.e. $\hat{B_{\mathfrak{q}}}\cong \hat{A_{\mathfrak{p}}}[[x_1,\cdots,x_n]]$ for some $n\geq0$, then $A\to B$ is smooth at $\mathfrak{q}$.
If it is correct, can you provide any references?