Localization of Finitely Generated $k$-algebra is Catenary (Vakil FOAG Exercise 11.2.F) A ring $A$ is catenary if for any two prime ideals $\mathfrak{p} \subset \mathfrak{q}$ of $A$, any maximal chain of prime ideals between them has the same length. The exercise asks to show that any localization of finitely generated algebra over a field $k$ is catenary. Clearly the quotient and localization of a catenary ring is catenary (by the correspondence theorems, for quotient and localization respectively). Thus, the exercise easily reduced to the case where $A = k[x_1, \cdots, x_n]$.
Note that the exercise does not assume any knowledge of Cohen-Macaulay nor regular ring, but instead it is supposed to be an algebraic translation of the following geometric fact:

(Theorem 11.2.9) If $X$ is an irreducible $k$-variety with a irreducible closed subset $Y$ with generic point $\eta$, then $\dim X = \dim Y + \dim \mathcal{O}_{X, \eta}$

What I don't see is how to use this theorem. Using this theorem (with $X=\operatorname{Spec} A$), we have
$$\dim A = \dim V(\mathfrak{p}) + \dim A_\mathfrak{p}$$
$$\dim A = \dim V(\mathfrak{q}) + \dim A_\mathfrak{q}$$
But I'm stuck here. In particular, the dimension is defined as the supremum among the length of all chains, so how can we use it to say something about the exact length of all chains?
 A: The key idea is to show that given a chain which is too short, we can always insert a prime somewhere in it and increase the length. I'll give you the geometric version first then talk about the translation to algebra.
It suffices to show that if $X$ is an irreducible $k$-variety, then the maximal proper irreducible $k$-subvarieties are of dimension $\dim X-1$. We may immediately reduce to the affine case $X=\operatorname{Spec} A$. If $Y=V(\mathfrak{p})$ is a maximal proper $k$-subvariety $\dim Y<\dim X-1$, then the local ring $A_\mathfrak{p}$ has dimension $>1$ by the theorem. But this means there is some ideal in $A_\mathfrak{p}$ sitting properly between $0$ and $\mathfrak{p}_\mathfrak{p}$ which lifts to a prime ideal between $0$ and $\mathfrak{p}$, so $Y$ wasn't maximal.
Translating to algebra, the point is that if we ever have a chain of prime ideals $$P_0\subset \cdots \subset P_m\subset R$$ with $m< \dim R$, then (after assuming $P_0$ is minimal and $P_m$ is maximal) there must be some place where $\dim V(P_i) = \dim R/P_i > \dim R/P_{i+1} + 1 = \dim V(P_{i+1})+1$. Then the work above shows that we can always insert a prime between $P_i$ and $P_{i+1}$, hence extending our chain.
