$\newcommand\Spec{\mathrm{Spec}}$

$ $

Since finiteness is local in the base, we may
assume that $Y = \Spec(A)$ is affine.

The assumption then becomes that $f: X \rightarrow \Spec(A)$ is
quasi-compact, and that $X$ may be covered by finitely many
(by quasi-compactness)
open affines $\Spec(B)$ which are finite over $A$.

Suppose that $f$ is an open immersion. We show that $X$ is closed
and hence finite in $Y$.
Since conditions (i) and (ii) are local on the base, we may
assume that $Y = \Spec(A)$ is connected.
Then, for each $\Spec(B)$ in our cover of $X$,
$\Spec(B)$ is open in $X$ and hence $Y$, and yet finite and thus closed in $Y$.
Since $Y$ is connected, it follows that either $\Spec(B) = X = Y$,
or $X$ is the empty set.

Suppose that $f$ is separated. Then, by Zariski's main theorem, there
exists a factorization
$$X \rightarrow \Spec(A') = Y' \rightarrow \Spec(A) = Y$$
where the first map is an open immersion and the second is finite.
It follows that for each $B$ there is a map $A \rightarrow A'
\rightarrow B$ which makes $B$ finite over $A$. It follows that $B$
is also finite over $A'$. Hence, by the argument above, $X$ is finite
over $Y'$,
and thus $X \rightarrow Y$ is also finite.

Suppose, however, that $f$ is not separated. Then take $X$ to be the
affine line with the origin doubled and $Y$ to be the affine line.
Then the map $X \rightarrow Y$ is not finite because it is not even affine.

no; e.g. if we take the affine line with the doubled origin, then there is a natural morphism from this to the affine line (identifying the two origins) which is locally finite and q.c., but not finite (since not affine, indeed not separated). If $f$ is separated, then the answer isyes, see this answer: math.stackexchange.com/a/387260/221 Best wishes, Matt – Emerton May 10 '13 at 4:45