Surjective+finite-type+quasi-finite doesn't imply finite Exercise II.3.5 (c) in Hartshorne, Algebraic Geometry, asks to find an example of a surjective, finite-type and quasi-finite morphism of schemes which is not finite.
I need to find a finitely generated $A$-algebra $B$ which is not finite generated as an $A$-module. The only examples, I could find, of such a kind of $B$ give rise to a morphism which is not quasi-finite. Basically I was trying to use some modification of the classic $B=\mathbb{C}[x]$. I have also thought to  find a morphism which is not closed, since we know that a finite morphism is always closed, but even this way didn't lead me anywhere.
Do you have any suggestion?
P.S.: $f$ quasi-finite means that $f^{-1}(y)$ is a finite set for every point $y\in Y$.
MOREOVER: while thinking at this example, I asked another question to myself. Which is a quasi-finite morphism which is not of finite-type? 
Thank you very much!
 A: The example given, $Y=\mathbf A^1_k$ for $k$ any field, $X=A\sqcup B$ for $A=\operatorname{Spec} k[x,y]/(xy-1)$, $B=\{\ast\}=\operatorname{Spec} k$, is valid. Here the map $f:X\rightarrow Y$ is induced by the map $\varphi:k[x]\rightarrow\Gamma(X,\mathscr O_X)=\Gamma(A\sqcup B,\mathscr O_A\times\mathscr O_B)\cong k[x,y]/(xy-1)\times k$, which is in turn induced by the universal property of the product by the maps $k[x]\rightarrow k[x,y]/(xy-1)$, $k[x]\rightarrow k$. It is obviously quasi-finite; it is of finite type since $X=A\sqcup B$ is a cover of $X$ by open affines and $Y$ is itself affine. Surjectivity of closed points is obvious. Finally, if $\eta$ is the generic point of $A$, and $\xi$ is the generic point of $Y$, then we ask what is $f(\eta)$. If $\mathfrak m\subset\mathscr O_{X,\eta}$ is the maximal ideal of the stalk, and $p_\eta:\Gamma(X,\mathscr O_X)$ is the map into the stalk, then $f(\eta)$ is the point in $Y$ corresponding to $\varphi^{-1}p_\eta^{-1}(\mathfrak m)$. But now $$\mathscr O_{X,\eta}\cong (k[x,y]/(xy-1)\times k)_{(0,k)}\cong (k[x,y]/(xy-1))_{(0)}=k(x)$$ with $\mathfrak m=(0)$ in that ring, so $f(\eta)$ corresponds to $\varphi^{-1}((0,k))=(0)$.
A: One can also find examples over the complex numbers in which the source is irreducible:
Let $f \colon \mathbb{A}^{1} \to \mathbb{A}^{1}$ be the ramified cover given by $z \mapsto z^{2}$ at the level of coordinate rings. Let $i \colon \mathbb{A}^{1} \setminus \{ 1 \} \to \mathbb{A}^{1}$ be the open immersion of the complement of a closed point which is not the origin. Then $f_{0} := f \circ i$ is quasi-finite and surjective, but not proper, hence not finite.
One can check that $f_{0}$ is not proper with the valuative criterion for properness, but the intuititon for this example came from the analytic topology. In fact, when I googled "a finite morphism is closed in the analytic topology" I found this answer, which is exactly the kind of example that I had in mind and seems to confirm the suspicion I had about finite morphisms being closed in the analytic topology (doesn't really confirm it, but it seems that the author was thinking along similar lines at least).
A: Here is a different example.
Take $X=\operatorname{Spec}\mathbb Z[x]/(3x^2+2x+1)$ and $Y=\operatorname{Spec}\mathbb Z$. Then $X\to Y$ is clearly finite-type, but not finite since it isn't integral. Furthermore, the fibers over $(p)$ and $(0)$ are $\operatorname{Spec}\mathbb F_p[x]/(3x^2+2x+1)$ and $\operatorname{Spec}\mathbb Q[x]/(3x^2+2x+1)$, respectively, which are finite but nonempty, as desired.
