Recall that $\mathcal{O}_{S, s} = \colim \mathcal{O}_S(U)$ where the colimit is over the system of affine neighbourhoods $U$ of $s$. Thus the category of algebraic spaces of finite presentation over the local ring is the colimit of the categories of algebraic spaces of finite presentation over the affine neighbourhoods of $s$. See Limits of Spaces, Lemma \ref{spaces-limits-lemma-descend-finite-presentation}. In this way we reduce to the case where $S$ is the spectrum of a local ring and $s$ is the closed point. \medskip\noindent Assume $S = \Spec(A)$ where $A$ is a local ring and $s$ is the closed point. Write $A = \colim A_j$ with $A_j$ local Noetherian (say essentially of finite type over $\mathbf{Z}$) and local transition homomorphisms. Set $S_j = \Spec(A_j)$ with closed point $s_j$. We can find a $j$ and families of curves $X_j \to S_j$, $Y_{j, i} \to S_j$, see Lemma \ref{lemma-curves-qs-lfp} and Limits of Stacks, Lemma \ref{stacks-limits-lemma-representable-by-spaces-limit-preserving}. After possibly increasing $j$ we can find morphisms $c_{j, i} : X_j \to Y_{j, i}$ whose base change to $s$ is $c_i$, see Limits of Spaces, Lemma \ref{spaces-limits-lemma-descend-finite-presentation}. Since $\kappa(s) = \colim \kappa(s_j)$ we can similarly assume there is an isomorphism $Y_{j, 1, s_j} \cong Y_{j, 2, s_j}$ compatible with $c_{j, 1, s_j}$ and $c_{j, 2, s_j}$. Finally, the assumptions $c_{1, s, *}\mathcal{O}_{X_s} = \mathcal{O}_{Y_{1, s}}$ and $R^1c_{1, s, *}\mathcal{O}_{X_s} = 0$ are inherited by $c_{j, 1, s_j}$ because $\{s_j \to s\}$ is an fpqc covering and $c_{1, s}$ is the base of $c_{j, 1, s_j}$ by this covering (details omitted). In this way we reduce the lemma to the case discussed in the next paragraph. \medskip\noindent Assume $S$ is the spectrum of a Noetherian local ring $\Lambda$ and $s$ is the closed point. Consider the scheme theoretic image $Z$ of $$ (c_1, c_2) : X \longrightarrow Y_1 \times_S Y_2 $$ The statement of the lemma is equivalent to the assertion that $Z$ maps isomorphically to $Y_1$ and $Y_2$ via the projection morphisms. Since taking the scheme theoretic image of this morphism commutes with flat base change (Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-flat-base-change-scheme-theoretic-image}, we may replace $\Lambda$ by its completion (More on Algebra, Section \ref{more-algebra-section-permanence-completion}). \medskip\noindent Assume $S$ is the spectrum of a complete Noetherian local ring $\Lambda$. Observe that $X$, $Y_1$, $Y_2$ are schemes in this case (More on Morphisms of Spaces, Lemma \ref{spaces-more-morphisms-lemma-projective-over-complete}). Denote $X_n$, $Y_{1, n}$, $Y_{2, n}$ the base changes of $X$, $Y_1$, $Y_2$ to $\Spec(\Lambda/\mathfrak m^{n + 1})$. Recall that the arrow $$ \Deformationcategory_{X_s \to Y_{2, s}} \cong \Deformationcategory_{X_s \to Y_{1, s}} \longrightarrow \Deformationcategory_{X_s} $$ is an equivalence, see Deformation Problems, Lemma \ref{examples-defos-lemma-schemes-morphisms-smooth-to-base}. Thus there is an isomorphism of formal objects $(X_n \to Y_{1, n}) \cong (X_n \to Y_{2, n})$ of $\Deformationcategory_{X_s \to Y_{1, s}}$. Finally, by Grothendieck's algebraization theorem (Cohomology of Schemes, Lemma \ref{coherent-lemma-algebraize-morphism}) this produces an isomorphism $Y_1 \to Y_2$ compatible with $c_1$ and $c_2$.