Lemma 31.18.4. Let $f : X \to S$ be a morphism of schemes. If $D_1, D_2 \subset X$ are relative effective Cartier divisor on $X/S$ and $D_1 \subset D_2$ as closed subschemes, then the effective Cartier divisor $D$ such that $D_2 = D_1 + D$ (Lemma 31.13.8) is a relative effective Cartier divisor on $X/S$.

Proof. This translates into the following algebra fact: Let $A \to B$ be a ring map and $h_1, h_2 \in B$. Assume the $h_ i$ are nonzerodivisors, that $B/h_ iB$ is flat over $A$, and that $(h_2) \subset (h_1)$. Then we can write $h_2 = h h_1$ where $h \in B$ is a nonzerodivisor. We get a short exact sequence

$0 \to B/hB \to B/h_2B \to B/h_1B \to 0$

where the first arrow is given by multiplication by $h_1$. Since the right two are flat modules over $A$, so is the middle one, see Algebra, Lemma 10.39.13. $\square$

In your comment you can use Markdown and LaTeX style mathematics (enclose it like $\pi$). A preview option is available if you wish to see how it works out (just click on the eye in the toolbar).