I want to show that the functor $O: Sob \to Loc$ from the sober topological spaces to the locales is faithful. So take $X,Y$ two sober topological spaces. I want to show that the map $$O_{X,Y}: Hom(X,Y)\to Hom(O(Y),O(X))$$ is injective, where $O(X)$ is the set of open sets of $X$.
So let $f,g:X\to Y$ two continuous masp such that $O_{X,Y}(f)=O_{X,Y}(g)$. So for all open set $U$ of $Y$ we have $f^{-1}(U)=g^{-1}(U)$. Is this enough to say that $f=g$?