Let $\mathcal{F}$ be a sheaf on a topological space $X$ and $U \subseteq X$ be an open subset. We know that for all $p\in U$ we have a ring homomorphism $\mathcal{F}(U)\to \mathcal{F}_p$ (the stalk of $\mathcal{F}$ in $p$) that sands $\phi$ to $\overline{(U,\phi)}$. Now I have to prove that if two sections $\phi,\psi$ coincide in the stalks $\mathcal{F}_p$ for all $p \in U$ then $\phi=\psi$. And this is easy with the gluing property of the sheaf. After that I have to prove that if $X$ is irreducible and $\mathcal{F}$ is the sheaf of regular functions $\mathcal{O}_X$ then $\phi,\psi$ coincide in $\mathcal{O}(U)$ if they coincide in the stalk $\mathcal{O}_{X,p}$ for a generic $p\in U$.
I know that $$\mathcal{O}_{X,p}\cong \Big\{\frac{g}{f}:f,g \in A(X), f(p)\neq 0 \Big\}\cong A(X)_{I(p)}$$ with the iso $$A(X)_{I(p)} \to \mathcal{O}_{X,p}$$ $$\frac{g}{f} \mapsto \overline{\Big(D(f),\frac{g}{f}\Big)}$$ So if we take $\phi,\psi$ in $\mathcal{O}_X$ that coincide in $\mathcal{O}_{X,p}$, they are representable by the same class $\overline{\Big(D(f),\frac{g}{f} \Big)}.$
The problem is:
At this point is not totally clear to me if I can say that exists $U_p \subseteq U$ open such that $p \in U_p$ and $\phi=\frac{g}{f}=\psi$ (since this 3 regular function as the same representative) on $U_p$.
So they are the same regular function for the identity theorem for regular functions ($X$ is irreducible).