You don't just want to prove that $D(f)$ is isomorphic to $\mathrm{Spec}(A_f)$ as locally ringed spaces via some random isomorphism. The ring map $\psi:A\rightarrow A_f$ (localization map) induces a morphism of schemes $g=\mathrm{Spec}(\psi):X=\mathrm{Spec}(A_f)\rightarrow Y=\mathrm{Spec}(A)$. As you seem to already know, the underlying map of topological spaces is a homeomorphism onto $D(f)$, which is an open subset of $Y$.
In general, a morphism of locally ringed spaces $g:X\rightarrow Y$ is called an open immersion if $g$ induces (on the underlying topological spaces) a homeomorphism onto an open subset of the target and $g_x^\sharp:\mathscr{O}_{Y,g(x)}\rightarrow\mathscr{O}_{X,x}$ is an isomorphism for each $x\in X$. It is equivalent for there to exist an open subset $V$ of $Y$ and an isomorphism of locally ringed spaces $h:X\cong V$ such that $i\circ h=g$, where $i:V\hookrightarrow Y$ is the canonical inclusion morphism and $V$ is regarded as a locally ringed space in the standard way, by restricting the structure sheaf of $Y$. If $g$ is an open immersion in the first sense, then $V=g(X)$ is open in $Y$, and there is a unique isomorphism $h:X\cong V$ with $i\circ h=g$.
So you just need to prove that the map $g$ is an open immersion. You already have the topological part, so the sheaf part amounts to proving that for each prime ideal $\mathfrak{q}$ of $A_f$, the map of stalks $g_\mathfrak{q}^\sharp:A_{\psi^{-1}(\mathfrak{q})}\rightarrow (A_f)_{\mathfrak{q}}$, is an isomorphism. Note that this map is given, by definition, by $a/s\mapsto\psi(a)/\psi(s)$, using the standard description of localizations as equivalence classes of fractions. Basic properties of localization tell you that $\mathfrak{q}$ has the form $\mathfrak{p}A_f$ for a unique prime ideal $\mathfrak{p}$ of $A$ not containing $f$, i.e. $\mathfrak{p}\in D(f)$, and the inverse image $\psi^{-1}(\mathfrak{q})$ is $\mathfrak{p}$. So you are reduced to the following claim: if $\mathfrak{p}\in D(f)$, then the canonical map induced by $\psi$, $A_\mathfrak{p}\rightarrow(A_f)_{\mathfrak{p}A_f}$, is an isomorphism.
You can prove this by explicitly manipulating fractions, but that's kind of messy in my opinion. I think it is better to observe that the map in question is defined solely in terms of the universal property of localization. Namely, the composite of localization maps $A\rightarrow A_f\rightarrow (A_f)_{\mathfrak{p}A_f}$ visibly sends $A\setminus\mathfrak{p}$ into the units of the target ring, so there is a unique $A$-algebra map $A_\mathfrak{p}\rightarrow (A_f)_{\mathfrak{p}A_f}$. This is $g_{\mathfrak{p}A_f}^\#$. Using similar considerations, you can, via the universal property of localization, produce a ring map in the other direction, and then verify, now using the uniqueness in the universal property, that the composite of the two maps in both directions is the identity on the appropriate ring, i.e., the maps are inverses of one another.
So, your approach is more or less correct in spirit, but somewhat out of order. It is not enough to show that the local rings of two locally ringed spaces match up, i.e., this does not yield a morphism in general (it is true that two morphisms which have the same effect on topological spaces and induce the same maps of local rings are equal, but you cannot necessarily start with maps on local rings and produce a morphism). You have to start with the morphism (which you have, induced by $\psi$), and then prove that the canonical maps on stalks induced by $\psi$ are isomorphisms.
1) For your inclusion map, go back and re-examine the definition of closed subscheme of $X$; by definition it is a subset $Y$ of $X$ equipped with a sheaf of rings $O_Y$ and a surjective sheaf morphism $\pi:O_X\to O_Y$. So the inclusion map is the pair given by the "topological" inclusion $Y\hookrightarrow X$ and the morphism $\pi$. Right now we do not know what exactly the map of sheaves looks like, but the theorem we are proving is supposed to be proving that locally $\pi$ "looks like" surjections $R\to R/I$.
2) He is not assuming $f^*$ is surjective as far as I can tell. By definition, $$A=\Gamma(X,Q)=\ker(\Gamma(X,O_X)\to\Gamma(Y,O_Y))=\ker(R\overset{f^*}\to\Gamma(Y,O_Y)),$$
and then it follows (a simple ring theory fact, sometimes called the "universal property of quotients") that the homomorphism $R/A\to\Gamma(Y,O_Y)$ given by sending $r+A\mapsto f^*(r)$ a well-defined homomorphism (and, again, this does not use surjectivity). In other words $f^*$ factors through $R/A$.
I hope this addresses your questions; let me know if not.
Best Answer
I am a bit confused by the notation used (I have never used Mumford or read any books by him). If you'll permit me, I can provide a proof of this in what I feel to be a slightly more straightforward fashion.
Let $ \mathscr{I} = \ker f^\#$ be the sheaf of ideals and take $I = \mathscr{I} (X)$. We then have an exact sequence
$$ 0 \to I \to R \to \mathcal{O}_Y (Y) $$
Now any closed immersion $f$ identifies $Y$ with the support of $\mathscr{I}$ as a closed subscheme of $X$. Let $g \in R$ and let $h = f^\# (X)(g) \in \mathcal{O}_Y (Y)$. By tensoring with the above sequence with $R_g$ which is localization, which is an exact functor, we get
$$ 0 \to I_g = I \otimes_R R_g \to R_g \to \mathcal{O}_Y(Y)_h = \mathcal{O}_Y (Y_h) = f_* \mathcal{O}_Y (D(g))$$
Therefore, $\mathscr{I} (D(g)) = I_g$. Now for the $i: \textrm{Spec } R/I \to \textrm{Spec } R$ induced by the projection map, we see that $\mathscr{I} = \ker i^\# $ and so indeed, $Y \cong \textrm{Spec } R/I$.