Let $\operatorname{Spec}(A_1), \operatorname{Spec}(A_2)$ be two affine scheme, assume we glue then together along the distinguished open set $D(f_1)\subset \operatorname{Spec}(A_1),D(f_2) \subset\operatorname{Spec}(A_2)$. The isomorphism between $D(f_1)\cong D(f_2)$ is given as follows, we define an isomorphism $$\phi:({A_1})_{f_1}\to (A_2)_{f_2} $$ then it will induce isomorphism of $D(f_1)$ and $D(f_2)$ therefore we can glue them together.To form a scheme $X$. Assume it happens to be an affine scheme with $X= \operatorname{Spec}(A)$
The question is what's the relation between coordinate ring $A$ and $A_1,A_2$ ?
I see in this post that the coordinate ring $A$ is limit of $A_1,A_2$ under identification $\phi$ , I don't know how to see it