Suppose that $A$ and $B$ are commutative rings containing a field $k$, and $B$ is finitely generated $k$-algebra. Let $\phi: A\rightarrow B$ be a ring homomorphism with $\phi|_k =\mathrm{Id}$. I am trying to prove that if $M\subset B$ is a maximal ideal, then $\phi^{-1}(M)$ is a maximal ideal of $A$.
The case when $A \subset B$ is an integral extension of rings is well-known. I think I can also prove the result when $\phi$ is surjective.
Inverse Image of Maximal Ideals discusses the case when $B$ is a finitely generated $\mathbb{Z}$-algebra but I am not sure how to generalize this.