Note that we only need consider the case (of your setup) where $U \cup V$ is affine. If the function obtained by gluing $fs$ and $ft$ is not a multiple of $f$, then it is a nonzero element in $ \mathcal O (U \cup V) /f$, hence a nonzero function on $\operatorname{Spec} ( \mathcal O (U \cup V)/f)$. But $\operatorname{Spec} ( \mathcal O (U \cup V)/f)$ is covered by $\operatorname{Spec} ( \mathcal O (U)/f)$ and $\operatorname{Spec} ( \mathcal O (V)/f)$ so the function must be nonzero on one of those, contradiction.
The general principle here is that kernels of maps of sheaves can be computed one open set at a time.
But probably the simplest proof is to reduce to distinguished affine opens and do it algebraically. Suppose we have an affine open $\operatorname{Spec} R$ covered by open sets $\operatorname{Spec} R [1/a_i]$ where $a_i$ generate the unit ideal. If a global section $x$ of the structure sheaf restricts to a multiple of $f$ on each open, then for all $i$ we have $$ a_i^{e_i} (x - f s_i) =0$$ for some $e_i$ and $s_i$.
Because the $a_i$ generate the unit ideal, we have $\sum_{i=1}^n a_ib_i=1$, so $$x = \left(\sum_{i=1}^n a_ib_i\right)^{1-n + \sum_{i=1}^n e_i } x$$ and when we expand out the multionmial we can write each term as a multiple of $f$ using the appropriate identity, so $x$ is a multiple of $f$.