Let $X$ and $Y$ be irreducible affine varieties, and $$F : X\rightarrow Y$$ is a morphism of affine varieties which is a homeomorphism in the Zariski topology. My question is, how to show $$F^\#:A(Y)\rightarrow A(X) $$ is an isomorphism between those two coordinate rings?
I see that if $F$ is an isomorphism between varieties, the conclusion is obvious. But now $F$ is only a topological homeomorphism.
I think the injective part is easy, because $F$ is homeomorphism, $F(X)$ is dense, thus $F^\#$ is injective by a proven proposition.
Now I have trouble in the surjective case. There is hint in my note, saying that
Let $g\in A(X)$, we show that for all $x\in X$, there is an open neighborhood $V_x$ of $F(x)$ and a regular function $(V_x, h_x)\in\mathcal{O}_{Y,F(X)}$ such that $F^\#(V_x,h_x)=(F^{-1}(V_x), g\left.\right|_{F^{-1}(V_x)})$.
Could anyone show me how to construct such $h_x$?
Update
Sorry I missed an important condition. Following is the original text from the note I am reading. It is an exercise.
Let $X$ and $Y$ be irreducible affine varieties. Suppose that $F:X\rightarrow Y$ is a morphism of affine varieties which is a homeomorphism in the Zariski topology, which induces isomorphisms $F_x^\#:\mathcal{O}_{Y,F(x)}\rightarrow \mathcal{O}_{X,x}$ for every $x\in X$.
I believe the last statement is of importance, and I think by this, the original question I posted is obvious. We can just let $h_x$ to be the inverse of $g$ under $F_x^\#$.
However, then I need to show $h_x=h_{x'}$ in $V_x\cap V_{x'}$. I can't see how to do it. Could anyone help me?
Update
I think I figured it out. For two points $x$ and $x'$, we construct $$ h_x:=(F_x^\#)^{-1}g $$
and $$ h_{x'}:=(F_{x'}^\#)^{-1}g $$
On the overlapped area $V_x\cap V_{x'}$, since $F$ is a homeomorphism, we have $$ h_x(y)=h_x\circ F\circ F^{-1}(y) = g\circ F^{-1}(y) $$
and the same for $h_{x'}$.
Am I right?