Consider $\operatorname{Spec} A$ for some ring $A$.
When defining the structure sheaf, Hartshorne defines
For an open subset $U \subset \operatorname{Spec}(A)$, we define $\mathcal O(U)$ to be the set of all functions $s: U \to \coprod_{\mathfrak p \in U} A_{\mathfrak p}$, such that:
i.) $s(\mathfrak p) \in A_{\mathfrak p}$
ii.) for each $\mathfrak{p} \in U$, there is a neighborhood $V$ of $\mathfrak p$, contained in $U$, and elements $a, f \in A$ such that for each $\mathfrak q \in V$, we have $f \notin \mathfrak q$ and $s(\mathfrak q) = a/f \in A_{\mathfrak q}$.
In Eisenbud/Harris, after defining general schemes they write:
if $f \in \mathcal O_X(U)$ and $x \in U$, the image of $f$ under the composite $\mathcal O_X(U) \to \mathcal O_{X,x} \to \mathcal O_{X,x}/\mathfrak m_x$ is the value of $f$ at $x$.
If we take $X=\operatorname{Spec}A$, then these two definitions seem to be saying different things.
Hartshorne is saying $s \in \mathcal O(U)$ takes $\mathfrak p \in U$ to an element in $A_\mathfrak p$, whereas Eisenbud/Harris is saying $s \in \mathcal O(U)$ takes $\mathfrak p$ to an element of $A_\mathfrak p/ \mathfrak m_\mathfrak p$
What is going on here?