Let $f:A\rightarrow B$ be a morphism of commutative unital rings. Assume that there exists a positive integer $n$ and a surjective map of $A$-modules $A^n\rightarrow B$.
Let $\mathfrak{p}\subset A$ be a prime ideal with the residue field $k$. Then $B\otimes_A k$ is a finite-dimensional $k$-algebra. As such it splits into the direct product of finitely many non-zero local $k$-algebras.
I believe the factors are in bijection with the number of prime ideals of $B$ whose inverse image is $\mathfrak{p}$. How can I express the factors in terms of $f$? They definitely are not intrinsic to $A$ (project parabola onto different lines, the non-reduced point will be in different places depending on where you are projecting to).