If $U_i \subset X$, $i \in I$ is a collection of opens such that the restrictions $f|_{f^{-1}(U_i)} : f^{-1}(U_i) \to U_i$ are finite, then with $U = \bigcup U_i$ the restriction $f|_{f^{-1}(U)} : f^{-1}(U) \to U$ is finite, see Morphisms, Lemma \ref{morphisms-lemma-finite-local}. Thus the problem is local on $X$ and we may assume that $X$ is affine. \medskip\noindent Assume $X$ is affine. Write $Y = \bigcup_{j = 1, \ldots, m} V_j$ with $V_j$ affine. This is possible since $f$ is quasi-finite and hence in particular quasi-compact. Each $V_j \to X$ is quasi-finite and separated. Let $\eta \in X$ be a generic point of an irreducible component of $X$. We see from Morphisms, Lemmas \ref{morphisms-lemma-quasi-finite} and \ref{morphisms-lemma-generically-finite} that there exists an open neighbourhood $\eta \in U_\eta$ such that $f^{-1}(U_\eta) \cap V_j \to U_\eta$ is finite. We may choose $U_\eta$ such that it works for each $j = 1, \ldots, m$. Note that the collection of generic points of $X$ is dense in $X$. Thus we see there exists a dense open $W = \bigcup_\eta U_\eta$ such that each $f^{-1}(W) \cap V_j \to W$ is finite. It suffices to show that there exists a dense open $U \subset W$ such that $f|_{f^{-1}(U)} : f^{-1}(U) \to U$ is finite. Thus we may replace $X$ by an affine open subscheme of $W$ and assume that each $V_j \to X$ is finite. \medskip\noindent Assume $X$ is affine, $Y = \bigcup_{j = 1, \ldots, m} V_j$ with $V_j$ affine, and the restrictions $f|_{V_j} : V_j \to X$ are finite. Set $$ \Delta_{ij} = \Big(\overline{V_i \cap V_j} \setminus V_i \cap V_j\Big) \cap V_j. $$ This is a nowhere dense closed subset of $V_j$ because it is the boundary of the open subset $V_i \cap V_j$ in $V_j$. By Morphisms, Lemma \ref{morphisms-lemma-image-nowhere-dense-finite} the image $f(\Delta_{ij})$ is a nowhere dense closed subset of $X$. By Topology, Lemma \ref{topology-lemma-nowhere-dense} the union $T = \bigcup f(\Delta_{ij})$ is a nowhere dense closed subset of $X$. Thus $U = X \setminus T$ is a dense open subset of $X$. We claim that $f|_{f^{-1}(U)} : f^{-1}(U) \to U$ is finite. To see this let $U' \subset U$ be an affine open. Set $Y' = f^{-1}(U') = U' \times_X Y$, $V_j' = Y' \cap V_j = U' \times_X V_j$. Consider the restriction $$ f' = f|_{Y'} : Y' \longrightarrow U' $$ of $f$. This morphism now has the property that $Y' = \bigcup_{j = 1, \ldots, m} V'_j$ is an affine open covering, each $V'_j \to U'$ is finite, and $V_i' \cap V_j'$ is (open and) closed both in $V'_i$ and $V'_j$. Hence $V_i' \cap V_j'$ is affine, and the map $$ \mathcal{O}(V'_i) \otimes_{\mathbf{Z}} \mathcal{O}(V'_j) \longrightarrow \mathcal{O}(V'_i \cap V'_j) $$ is surjective. This implies that $Y'$ is separated, see Schemes, Lemma \ref{schemes-lemma-characterize-separated}. Finally, consider the commutative diagram $$ \xymatrix{ \coprod_{j = 1, \ldots, m} V'_j \ar[rd] \ar[rr] & & Y' \ar[ld] \\ & U' & } $$ The south-east arrow is finite, hence proper, the horizontal arrow is surjective, and the south-west arrow is separated. Hence by Morphisms, Lemma \ref{morphisms-lemma-image-proper-is-proper} we conclude that $Y' \to U'$ is proper. Since it is also quasi-finite, we see that it is finite by Lemma \ref{lemma-characterize-finite}, and we win.