Throughout this post we assume $X$ is a scheme satisfying the condition (*) stated at the beginning of Hartshorne II.6 ($X$ is a noetherian, integral, separated scheme which is regular in codimension 1). Denote the fraction field of $X$ by $k(X)$.
Consider a prime divisor $Y\subset X$ with generic point $\eta$. Then, the local ring $\mathcal{O}_{\eta,X}\subset k(X)$ is a DVR with valuation $v_Y$. Hartshorne then claims that, conversely, given the discrete valuation $v_Y: k(X)^\times\to\mathbb{Z}$ it's possible to recover $Y$ via exercise II.4.5, which states de following:
let $X$ be an integral of finite type over a field $k$, having function field $k(X)$. We say that a valuation $k(X)/k$ has center $x$ on $X$ if it's valuation ring dominates $\mathcal{O}_{X,x}$
(a) If $X$ is separated over $k$, then the center of any valuation of $k(X)/k$ on $X$ (if it exists) is unique.
[...]
I have two main questions, one regarding the proof of this exercise and the other on how to apply it to the divisor situation:
(1) Exercise 4.5 seems like a simple application of the valuative criterion of separatedness, so my first question is: do we really need the finite type hypothesis in here? To show this I want to construct the following diagram: $$ \require{AMScd} \begin{CD} \operatorname{Spec}K(X) @>{}>> \operatorname{Spec}\mathcal{O}_{X,x}\\ @VVV @VVV \\ \operatorname{Spec}R_v @>{}>> X, \end{CD} $$ where the generic points $(0)$ get mapped to $x\in X$. However, I don't know where to map the closed point of $\operatorname{Spec}R_v$. Is there a canonical choice? After this the result follows immediately, even without the finite type assumption.
(2) Given a prime divisor $Y$ with valuation $v_Y$, I want to show that the center of the valuation is exactly $\eta$, in which case it becomes clear how we recover $Y$. One direction is clear: $\eta$ is easily seen to be in the center of $v_Y$ ($\mathcal{O}_{\eta,X}$ dominates itself trivially). For the converse I consider two cases: $x$ is in the center of $v_Y$ and either $x\in Y$ or not.
If $x\in Y$ then by passing to an affine neighborhood, $U=\operatorname{Spec}A$, $x$ corresponds to some prime ideal $p$ and $Y$ another one $P$ where $P\subseteq p$. Since $A_P$ dominates $A_p$ we have in particular that $A_p\subseteq A_P$ and $P\cap A_p=p$ (inside $k(X)$). However, $P\subset A_p$ and we get that $P=p$, i.e., $x$ must be the generic point of $Y$.
When trying to apply the same approach to the case where $x\not\in Y$ I get stuck, we want to get a contradiction, but since I don't know how the local rings $\mathcal{O}_{X,x}$ and $\mathcal{O}_{X,\eta}$ (corresponding to $v_Y$) interact within $k(X)$ I can't proceed. Any suggestions for this part?
I guess part of my problem is that I don't know how would we recover a prime divisor from an arbitrary valuation.
You should consider the following diagram
$$ \require{AMScd} \begin{CD} \operatorname{Spec}K(X) @>>>X\\ @VVV @VVV \\ \operatorname{Spec}R_v @>>> \operatorname{Spec} k, \end{CD} $$
Now, let $x$ be a center of the valuation. By definition, this gives rise to a map $\operatorname{Spec} R_v \to \operatorname{Spec} \mathcal O_{X,x}$ and we can compose this map with the map $\operatorname{Spec} \mathcal O_{X,x} \to X$ to get a map $\operatorname{Spec} R_v \to X$.
You have to show two things:
1) This map fits into the commutative diagram (Check on an affine open containing $x$).
2) Different centers $x \in X$ give rise to different maps (Just check that the closed point is mapped to $x$).
If you combine 1) and 2) with valuative criterion, you of course get the uniqueness of the center.
I do not understand your last problem. You have shown that $\eta$ is a center and you already know that a center is unique if it exists. So there is nothing left to show.
Towards your question about the finite type hypothesis: I think you are right, one does not need the finite type hypothesis for part a) of the exercise. But in part c), you are supposed to show the converse, i.e. you have to show that $f$ is separated by using the valuative criterion. Then the finite type (hence noetherian) hypothesis comes in handy, because it allows you to check the truth of the valuative criterion on discrete valuations instead of arbitrary valuations.