I have two questions about the steps in proof of Prop. 7.1.15 in Liu's "Algebraic Geometry" (page 256):
First one: Why is the composition $K'_X(X) \hookrightarrow K'_X(U) \hookrightarrow K'_X(D(a))$ surjective (and therefore an isomorphism)?
And the second: The aim of the proof is to show that $K_X \to i_*K_U$ is an isomorphism of sheafs. In order prove the surjectivity there is proved that $K'_X(X) \to K'_X(U)$ and $K'_X(X) \to K_X(U)$ are surjective. Why is that enough to prove the surjectivity for sheaves given above in the claim?

One knows from before that $\mathcal{K}_X(X) = Frac(\mathcal{O}_X) = Frac(A)$, when $X$ is an affine scheme.Thus $\mathcal{K}_X(D(a)) = Frac(S^{-1}A)$, where $S = \lbrace 1,a,a^2, . . . \rbrace$. Thus all we have to show is that the map $A \rightarrow S^{-1}A$(since this is the composition os maps $D(a) \hookrightarrow U \hookrightarrow X$) induces an isomorphism $Frac(A) \rightarrow Frac(S^{-1}A)$. Now, note that $a$ doesnot belong to set of associated primes of $A$ and hence is not a zero divisor and we are inverting all the non-zero divisors in the ring.
The map $\mathcal{K}_X \rightarrow i_*\mathcal{K}_U$ is a unique extension of the map $\mathcal{K}'_X \rightarrow i_*\mathcal{K}_U$. Now it has been proved above that this latter map is surjective on any open affine subset of $X$. But the latter map is nothing but $\mathcal{K}'_X \subset \mathcal{K}_X \rightarrow i_*\mathcal{K}_U$, hence the map $\mathcal{K}_X \rightarrow i_*\mathcal{K}_U$ is surjective.