# Finitely many prime ideals lying over $\mathfrak{p}$

Let $A$ be a commutative ring with identity and $B$ a finitely generated $A$-algebra that is integral over $A$. If $\mathfrak{p}$ is a prime ideal of $A$, there are only finitely many prime ideals $P$ of $B$ such that $P\cap A=\mathfrak{p}$.

Let me say that I am aware of this answer, but I can't follow through the hint. Also, I don't know how to extend to work for algebras rather than extension rings.

Let $f:A\to B$ be a finite ring homomorphism and $\mathfrak p$ a prime ideal of $A$. Consider $S=A-\mathfrak p$ and the ring homomorphism $S^{-1}f:S^{-1}A\to S^{-1}B$. This is also a finite ring homomorphism and all primes of $B$ lying over $\mathfrak p$ "survive" in $S^{-1}B$. This shows that one can assume $A$ local.
If $A\to B$ is a finite ring homomorphism and $(A,\mathfrak m)$ is a local ring, then all prime ideals of $B$ lying over $\mathfrak m$ contain $\mathfrak mB$. This allows us to replace $A\to B$ by $A/\mathfrak m\to B/\mathfrak mB$ (which is also a finite ring homomorphism), and therefore one can assume that $B$ is a finite algebra over a field. Now we have to prove that any finite algebra over a field has only finitely many prime (maximal) ideals. But such algebra is an artinian ring...
For a ring map $$A\to B$$, and $$\mathfrak{p}$$ a prime ideal of $$A$$, the prime ideals which contract to $$\mathfrak{p}$$ are in $$1:1$$ correspondence to the prime ideals of $$\kappa(\mathfrak{p})\otimes_AB$$, where $$\kappa(p)=Q(A/\mathfrak{p})$$ is the quotient field of the domain $$A/\mathfrak{p}$$.
Now we come back to the question. Since $$\kappa(\mathfrak{p})\otimes_AB$$ is integral over $$\kappa(\mathfrak{p})$$, all prime ideals of $$\kappa(\mathfrak{p})\otimes_AB$$ must be maximal (in fancy words, the Krull dimension is zero). And note that $$\kappa(\mathfrak{p})\otimes_AB$$ is finitely generated over $$\kappa(\mathfrak{p})$$, then $$\kappa(\mathfrak{p})\otimes_AB$$ is noetherian. A noetherian ring whose prime ideals are all maximal is an Artinian ring. An Artinian ring has only finitely many prime ideals.