Proposition II.$3.2$ in Hartshorne Regarding to this question, I wonder why $\operatorname{Spec} A=\operatorname{Spec} B$, then $A$ is isomorphic to $B$.
To be more precise,
Let $A,B$ are rings, and suppose the schemes $\operatorname{Spec} A$ and $\operatorname{Spec} B$ are isomorphic as schemes. Then, I want to show $A$ and $B$ are isomorphic as rings.
Of course, if we see $\operatorname{Spec} A$ and $\operatorname{Spec} B$ as just a set of prime ideals, then we cannot say $A$ and $B$ are isomorphic as rings. For example, a pair of another fields is an example. Thank you.