I am confused about the following issue:

Let $X=SpecS$, $U_1=SpecR_1$, $U_2=SpecR_2$. and suppose we have maps $S \rightarrow R_1$, $S \rightarrow R_2$. Let $U_3=Spec (R_1 \otimes_S R_2)$. We have scheme maps $U_1 \rightarrow X$, $U_2 \rightarrow X$, $U_3 \rightarrow U_1$, $U_3 \rightarrow U_2$. The particular situation I have in mind is when $U_1$ and $U_2$ are distinguished (corresponding to localization of S at some element) open subschemes of $X$. Intersection of $U_1$ and $U_2$ is $U_3$, and the inclusion of $U_3$ in $X$ corresponds to $S$-algebra structure on $(R_1 \otimes_S R_2)$.

The category of affine schemes (ASch) is the opposite category of commutative rings (CRing). In CRing kernels (equalisers) of pairs of maps and products exist, so by a lemma from category theory limits should exist, in particular fibered coproducts should exist, so union of two affine schemes $U_1$ and $U_2$ over $U_3$ should be affine scheme $U_4$! But we know that in general it is not so! Maybe the problem is that abstractly it is an affine scheme but what is it's inclusion map into X? Actually there exists an obvious map on the ring side from $S$ to kernel of a pair of maps $R_1 \rightarrow (R_1 \otimes_S R_2)$, $R_2 \rightarrow (R_1 \otimes_S R_2)$.

Thank you!