Isomorphism of affine schemes I have read that the morphism between affine schemes $(X,O_X)$ and $(Y, O_Y)$
is an isomorphism if and only if it induces an isomorphism of the global sections.
I was interested in proving $\leftarrow$ direction of the statement, bu tI am really stuck. could someone please give me a hint on how to show this?
Thanks!

$X=\mathrm{spec}(A)$ and $Y=\mathrm{spec}(B)$.
An  isomorphism (of rings) $f:A=O_X(X)\to B=O_Y(Y)$  induce an isomorphism of schemes $f_{\mathrm{spec}}:(\mathrm{spec}(B),O_{\mathrm{spec}(B)})\to (\mathrm{spec}(B),O_{\mathrm{spec}(B)})$
But $(\mathrm{spec}(B),O_{\mathrm{spec}(B)})=(Y,O_Y)$ and $(\mathrm{spec}(A),O_{\mathrm{spec}(A)})=(X,O_X)$.
