In page 62 of Shaferevich Basic Algebraic Geometry the statement of Theorem 5 is:
If $f:X\rightarrow Y$ is a regular map of affine varieties and every point $x\in Y$ has an affine neighbourhood $U\ni x$ such that $V=f^{-1}(U)$ is affine and $f:V\rightarrow U$ is finite the $f$ itself is finite.
To prove this theorem he says we can take a neighbourhood $U$ of any point $Y$ such that $U$ is a principal open set and satisfies the assumption of the theorem. How is this so?
I proved that if $U\ni x$ is an principal open set of $Y$ then $f^{-1}(U)$ is also a principal open set of $X$. But then why $f:f^{-1}(U)\rightarrow U$ will also be a finite map?
You may use the results finite maps are closed and surjective.
$\textbf{Edit:}$ I specifically say where my confusion is:
Suppose $x\in Y$ fixed. Then by the hypothesis $\exists V\subseteq Y$, open, $V\ni x$ such that $V$ is affine and corresponding $U=f^{-1}(V)$ is also affine and $f:U\rightarrow V$ is finite, i.e., let $V\cong Z_1\subseteq \mathbb A^n$ and $U\cong Z_2\subseteq\mathbb A^m$, both $Z_1$ and $Z_2$ are closed and the corresponding map $\tilde{f}: Z_2\rightarrow Z_1$ is a finite map. Remember here $V$ and $U$ are given. So we cannot change them. Now, if $V_1\subseteq V$ is principal affine then $V_2=f^{-1}(V_1)\subseteq U$ is also affine. The book says $f:V_2\rightarrow V_1$ is a finite map, i.e., We have to show if $V_2\cong W_2\subseteq\mathbb A^p$ and $V_1\cong W_1\subseteq\mathbb A^q$ then the corresponding map $f':W_2\rightarrow W_1$ is a finite map. Here $p$ and $q$ may be different from $n$ and $m$ right?
Thank you.