Here is the context of this question.
Hartshorne claim that $O_X(U)\cong \beta_*(O_V)(U)=O_V(\beta^{-1}(U))$ for any open $U\subset X=\operatorname{Spec}A$,but it is possible that $\beta^{-1}(U)=\emptyset$ for some $U$.For example,let $U=X-\beta(V)$,since $\beta$ is a homeomorphism from $V$ to $\beta(V)\subset X$,$U$ is open and $\beta^{-1}(U)=\emptyset$.So $O_X(U)=0$.Contradiction?
Edit:There are no mistakes.We can show that $\beta^{-1}(U)\neq\emptyset$ for any $U \neq\emptyset$ using the fact that $\beta(V)$ is dense in $X$.