My question is about the hint of exercise 5.1 of Matsumura:
Let $k$ be a field,and $R=k[X_{1},\dots,X_{n}]$ and let $\mathfrak{p}\in \operatorname{Spec} R$. Set $k[X_{1},\dots,X_{n}]/\mathfrak{p}=k[x_{1},\dots,x_{n}]$. Suppose that $x_{1},\dots,x_{r}$ is a transcendence basis of $k(x)$ over $k$. Set $K=k[X_{1},\dots,X_{r}]$. Then the localization of $k[X_{1},\dots,X_{n}]$ at $\mathfrak{p}$ is the localization of $K[X_{r+1},\dots,X_{n}]$ at a prime ideal $P$.
My question is: Why does $k[X_{1},\dots,X_{n}]_{\mathfrak{p}}=K[X_{r+1},\dots,X_{n}]_{P}$ for some prime ideal $P$? And what does $P$ look like?