Consider the algebra $C = B \otimes_A B$ together with the pair of maps $p, q : B \to C$ given by $p(b) = b \otimes 1$ and $q(b) = 1 \otimes b$. Of course the two compositions $A \to B \to C$ are the same. Note that as $p : B \to C$ is flat and of finite presentation (base change of $A \to B$), the ring map $R \to C$ is of finite presentation (as the composite of $R \to B \to C$). \medskip\noindent We are going to use the criterion Algebra, Lemma \ref{algebra-lemma-characterize-finite-presentation} to show that $R \to A$ is of finite presentation. Let $S$ be any $R$-algebra, and suppose that $S = \colim_{\lambda \in \Lambda} S_\lambda$ is written as a directed colimit of $R$-algebras. Let $A \to S$ be an $R$-algebra homomorphism. We have to show that $A \to S$ factors through one of the $S_\lambda$. Consider the rings $B' = S \otimes_A B$ and $C' = S \otimes_A C = B' \otimes_S B'$. As $B$ is faithfully flat of finite presentation over $A$, also $B'$ is faithfully flat of finite presentation over $S$. By Algebra, Lemma \ref{algebra-lemma-flat-finite-presentation-limit-flat} part (2) applied to the pair $(S \to B', B')$ and the system $(S_\lambda)$ there exists a $\lambda_0 \in \Lambda$ and a flat, finitely presented $S_{\lambda_0}$-algebra $B_{\lambda_0}$ such that $B' = S \otimes_{S_{\lambda_0}} B_{\lambda_0}$. For $\lambda \geq \lambda_0$ set $B_\lambda = S_\lambda \otimes_{S_{\lambda_0}} B_{\lambda_0}$ and $C_\lambda = B_\lambda \otimes_{S_\lambda} B_\lambda$. \medskip\noindent We interrupt the flow of the argument to show that $S_\lambda \to B_\lambda$ is faithfully flat for $\lambda$ large enough. (This should really be a separate lemma somewhere else, maybe in the chapter on limits.) Since $\Spec(B_{\lambda_0}) \to \Spec(S_{\lambda_0})$ is flat and of finite presentation it is open (see Morphisms, Lemma \ref{morphisms-lemma-fppf-open}). Let $I \subset S_{\lambda_0}$ be an ideal such that $V(I) \subset \Spec(S_{\lambda_0})$ is the complement of the image. Note that formation of the image commutes with base change. Hence, since $\Spec(B') \to \Spec(S)$ is surjective, and $B' = B_{\lambda_0} \otimes_{S_{\lambda_0}} S$ we see that $IS = S$. Thus for some $\lambda \geq \lambda_0$ we have $IS_{\lambda} = S_\lambda$. For this and all greater $\lambda$ the morphism $\Spec(B_\lambda) \to \Spec(S_\lambda)$ is surjective. \medskip\noindent By analogy with the notation in the first paragraph of the proof denote $p_\lambda, q_\lambda : B_\lambda \to C_\lambda$ the two canonical maps. Then $B' = \colim_{\lambda \geq \lambda_0} B_\lambda$ and $C' = \colim_{\lambda \geq \lambda_0} C_\lambda$. Since $B$ and $C$ are finitely presented over $R$ there exist (by Algebra, Lemma \ref{algebra-lemma-characterize-finite-presentation} applied several times) a $\lambda \geq \lambda_0$ and an $R$-algebra maps $B \to B_\lambda$, $C \to C_\lambda$ such that the diagram $$ \xymatrix{ C \ar[rr] & & C_\lambda \\ B \ar[rr] \ar@<1ex>[u]^-p \ar@<-1ex>[u]_-q & & B_\lambda \ar@<1ex>[u]^-{p_\lambda} \ar@<-1ex>[u]_-{q_\lambda} } $$ is commutative. OK, and this means that $A \to B \to B_\lambda$ maps into the equalizer of $p_\lambda$ and $q_\lambda$. By Lemma \ref{lemma-ff-exact} we see that $S_\lambda$ is the equalizer of $p_\lambda$ and $q_\lambda$. Thus we get the desired ring map $A \to S_\lambda$ and we win.