TITLE: Why is this composition of scheme morphisms proper?
QUESTION [5 upvotes]: I am learning about proper morphisms from Liu's book. I have a question about the proof of the Lemma 3.17 on page 104. 
Let $A$ and $B$ be rings and suppose $\operatorname{Spec} B$ is proper over $A$. The lemma says that $B$ is finite over $A$. 
The proof begins by supposing that $B$ is singly generated over $A$, so that there is a surjective morphism $A[T]\rightarrow B$. We can consider $\operatorname{Spec} A[T]$ as an open subscheme of $\operatorname{Proj} A[T_1,T_2]$ by identifying it with the principal open set $D_+(T_2)$, setting $T=T_1/T_2$. We have the following composition of morphisms, where the first is a closed immersion and the second is an open immersion.
$$\operatorname{Spec} B \rightarrow \operatorname{Spec} A[T] \rightarrow \operatorname{Proj} A[T_1,T_2]$$
Why is this proper? To justify this, the book quotes a result saying that if one has a proper composition of two morphisms $f\circ g$, and $f$ is separated, then $g$ is proper. But here, we know the first morphism is proper and we want to deduce the composition is proper. 
If we knew this was a closed immersion, I think we could compose it with a map to $\operatorname{Spec} A[T_1,T_2]$ and use the fact that projective morphisms are proper in conjunction with the result cited above. But it does not appear to be a closed immersion.

REPLY [5 votes]: Just as a cultural remark: The morphism Spec $B \to$ Spec $A$ is affine, and a
very general principal is that affine + proper is equivalent to finite.
You may want to think about varieties: when can an affine variety (i.e. a closed subset of $\mathbb A^n$ for some $n$) be projective (i.e. isomorphic to a closed subvariety of $\mathbb P^r$ for some $r$)?
If so, since projective varieties are proper (and this is an intrinsic notion), it will actualy be closed in $\mathbb P^n$, i.e. its projective closure in $\mathbb P^n$ will have to be itself.  But the projective closure of any positive dimensional affine variety has a non-empty set of points at infinity (prove this!).
Thus a variety that is both affine and projective has to be finite.
Once you have understood this classical context (which I'm confident you can work out completely by yourself; it doesn't use more than the ideas in the
first couple of sections of Hartshorne Ch. I), you might want to go back to
Liu's proof and see if you can understand how he is generalizing it in his argument.