The following lemma is from Qing Liu's "Algebraic Geometry and Arithmetic Curves" p. 61. I don't understand why $A/\mathfrak p$ is a field (line 5-6 of the proof). In the proof, $k(x)$ is a residue field $\mathcal O_{X,x}/\mathfrak m_x$, where $\mathfrak m_x$ is a maximal ideal of $\mathcal O_{X,x}$.
I know that if $A_{\mathfrak p}$ is a finitely generated algebra over $k$, then by corollary 1.12, $k(x)\cong A_\mathfrak p/(\mathfrak p A_{\mathfrak p})$ is a finite extension of $k$. After that, I think one can somehow use the following theorem (from darij grinberg's answer in this thread) to show that $A/\mathfrak p$ is a field.
Theorem 1. Let $K$ be a field. Let $R$ and $L$ be two $K$-algebras such that $L$ is a finite-dimensional $K$-vector space and $R$ is an integral domain. Let $g:R\to L$ be an injective $K$-linear map. Then, $R$ is a field.
It's just that I couldn't prove that there is an injective $k$-linear map $A/\mathfrak p\to k(x)$.
In short, there are two missing steps in my attempt:
1. I couldn't prove that $A_\mathfrak p$ is a finitely generated algebra over $k$.
2. I couldn't prove that there is an injective $k$-linear map $A/\mathfrak p\to k(x)$.
The proof of lemma 4.3 uses some theorems from the book. I'll write them down here.
Part of Remark 1.3. Let $\mathfrak p\in\operatorname{Spec}A$. Then the singleton $\{\mathfrak p\}$ is closed for the Zariski topology if and only if $\mathfrak p$ is a maximal ideal of $A$.
Corollary 1.12. Let $A$ be a finitely generated algebra over a field $k$. Let $\mathfrak m$ be a maximal ideal of $A$. Then $A/\mathfrak m$ is a finite algebraic extension of $k$.