Showing that $\mathcal{O}(X_f)\cong\mathcal{O}(X)_f$ without schemes language I have seen this question here in the language of schemes, but I never studied this, so I hope someone can help me to solve this problem without schemes (I'm a beginner in this).
The problem is to show that $\mathcal{O}(X_f)\cong\mathcal{O}(X)_f$, where we have the following.
$\bullet \ X\subset\mathbb{A}^n_K$ is an irreducible variety over an algebraically closed field $K$
$\bullet \ \mathcal{O}(X)$ is the coordinate ring of $X$
$\bullet \ f\in\mathcal{O}(X)$
$\bullet \ X_f=\{p\in X: f(p)\neq0\}$
$\bullet \ \mathcal{O}(X_f)$ is the set of rational functions $g/h:X_f\rightarrow K$, with $g,h\in K[x_1,\ldots,x_n]$ and $h\neq0$ in $X_f$
$\bullet \ \mathcal{O}(X)_f = \{g/f^m\in Q(\mathcal{O}(X)): m\in\mathbb{N}\}$ is the localization of $\mathcal{O}(X)$ in $f$ and $Q(\mathcal{O}(X))$ is the field of fractions of $\mathcal{O}(X)$
I started trying to show that the restriction of functions $g/f^m$ to $X_f$ would give me a map $\mathcal{O}(X)_f\rightarrow\mathcal{O}(X_f)$, which would be the isomorphism. In fact, this the only idea which looks natural to me, I can't think in anything else. But I'm having some problems to show it is injective and mostly to show it is surjective. 
Thanks.

Here's the proof from Hartshorne.  I believe what you want is part (b).  It's pretty well written and followable, I was able to follow it without knowing anything about schemes.  If you want to discuss any particular points of it let me know.

