Proof (function field of affine patch)

Check this is well-defined:

$ϕ$ is clearly a ring homomorphism.

For surjectivity, suppose $F/G\in k(X_0)$ where $F$ has degree $d$ and $G\not\in I(X_0)$ has degree $e$. Note $G^\ast\not\in I(X)$ (since $G = (G^\ast)_\ast\not\in I(X_0)$) so $x_0^{e-d} F^\ast/G^\ast$ is an element of $k(X)$. Dehomogenising this gives $F/G$ as required.

The statement on local rings is clear: if $g(P)\neq 0$, then $g_\ast(P)\neq 0$.