If $f:A\to B$ is a ring homomorphism, then I want to show that $f^{-1}(\mathfrak{p})$ is a prime ideal of $A$, given that $\mathfrak{p}$ is a prime ideal of $B$.
Say $ab\in f^{-1}(\mathfrak{p})$. Then $f(ab)\in \mathfrak{p}$ and $f(ab)=f(a)f(b)$, so since $\mathfrak{p}$ is prime, $f(a)$ or $f(b)$ is in $\mathfrak{p}$. But then we can consider $f^{-1}(\mathfrak{p})\supseteq f^{-1}(f(a))\ni a$ and $f^{-1}(\mathfrak{p})\supseteq f^{-1}(f(b))\ni b$ in which case $a$ or $b$ is in $f^{-1}(\mathfrak{p})$.
Is this okay?
Secondly. Why does one denote $f^{-1}(\mathfrak{p}) = \mathfrak{p}\cap A$. This is 'literally' incorrect isn't it? This is notation of Matsumura.
Here's a slightly different approach: $f^{-1}(\mathfrak{p})$ is the kernel of the composition of the homomorphisms $f:A\to B$ and $\pi:B\to B/\mathfrak{p}$. The image of $\pi\circ f$ is a subring of $B/\mathfrak{p}$, which is an integral domain, and so the image of $\pi\circ f$ is an integral domain. So the kernel of $\pi\circ f$ is a prime ideal.