We first prove (1). Note that under the hypotheses of the lemma the sheaf $R^0f_*\mathcal{F} = f_*\mathcal{F}$ is quasi-coherent by Schemes, Lemma \ref{schemes-lemma-push-forward-quasi-coherent}. Using Cohomology, Lemma \ref{cohomology-lemma-localize-higher-direct-images} we see that forming higher direct images commutes with restriction to open subschemes. Since being quasi-coherent is local on $S$ we may assume $S$ is affine. \medskip\noindent Assume $S$ is affine and $f$ quasi-compact and separated. Let $t \geq 1$ be the minimal number of affine opens needed to cover $X$. We will prove this case of (1) by induction on $t$. If $t = 1$ then the morphism $f$ is affine by Morphisms, Lemma \ref{morphisms-lemma-morphism-affines-affine} and (1) follows from Lemma \ref{lemma-relative-affine-vanishing}. If $t > 1$ write $X = U \cup V$ with $V$ affine open and $U = U_1 \cup \ldots \cup U_{t - 1}$ a union of $t - 1$ open affines. Note that in this case $U \cap V =  (U_1 \cap V) \cup \ldots (U_{t - 1} \cap V)$ is also a union of $t - 1$ affine open subschemes, see Schemes, Lemma \ref{schemes-lemma-characterize-separated}. We will apply the relative Mayer-Vietoris sequence $$ 0 \to f_*\mathcal{F} \to a_*(\mathcal{F}|_U) \oplus b_*(\mathcal{F}|_V) \to c_*(\mathcal{F}|_{U \cap V}) \to R^1f_*\mathcal{F} \to \ldots $$ see Cohomology, Lemma \ref{cohomology-lemma-relative-mayer-vietoris}. By induction we see that $R^pa_*\mathcal{F}$, $R^pb_*\mathcal{F}$ and $R^pc_*\mathcal{F}$ are all quasi-coherent. This implies that each of the sheaves $R^pf_*\mathcal{F}$ is quasi-coherent since it sits in the middle of a short exact sequence with a cokernel of a map between quasi-coherent sheaves on the left and a kernel of a map between quasi-coherent sheaves on the right. Using the results on quasi-coherent sheaves in Schemes, Section \ref{schemes-section-quasi-coherent} we see conclude $R^pf_*\mathcal{F}$ is quasi-coherent. \medskip\noindent Assume $S$ is affine and $f$ quasi-compact and quasi-separated. Let $t \geq 1$ be the minimal number of affine opens needed to cover $X$. We will prove (1) by induction on $t$. In case $t = 1$ the morphism $f$ is separated and we are back in the previous case (see previous paragraph). If $t > 1$ write $X = U \cup V$ with $V$ affine open and $U$ a union of $t - 1$ open affines. Note that in this case $U \cap V$ is an open subscheme of an affine scheme and hence separated (see Schemes, Lemma \ref{schemes-lemma-affine-separated}). We will apply the relative Mayer-Vietoris sequence $$ 0 \to f_*\mathcal{F} \to a_*(\mathcal{F}|_U) \oplus b_*(\mathcal{F}|_V) \to c_*(\mathcal{F}|_{U \cap V}) \to R^1f_*\mathcal{F} \to \ldots $$ see Cohomology, Lemma \ref{cohomology-lemma-relative-mayer-vietoris}. By induction and the result of the previous paragraph we see that $R^pa_*\mathcal{F}$, $R^pb_*\mathcal{F}$ and $R^pc_*\mathcal{F}$ are quasi-coherent. As in the previous paragraph this implies each of sheaves $R^pf_*\mathcal{F}$ is quasi-coherent. \medskip\noindent Next, we prove (3) and a fortiori (2). Choose a finite affine open covering $S = \bigcup_{j = 1, \ldots m} S_j$. For each $i$ choose a finite affine open covering $f^{-1}(S_j) = \bigcup_{i = 1, \ldots t_j} U_{ji} $. Let $$ d_j = \max\nolimits_{I \subset \{1, \ldots, t_j\}} \left(|I| + t(\bigcap\nolimits_{i \in I} U_{ji})\right) $$ be the integer found in Lemma \ref{lemma-vanishing-nr-affines-quasi-separated}. We claim that $n(X, S, f) = \max d_j$ works. \medskip\noindent Namely, let $S' \to S$ be a morphism of schemes and let $\mathcal{F}'$ be a quasi-coherent sheaf on $X' = S' \times_S X$. We want to show that $R^pf'_*\mathcal{F}' = 0$ for $p \geq n(X, S, f)$. Since this question is local on $S'$ we may assume that $S'$ is affine and maps into $S_j$ for some $j$. Then $X' = S' \times_{S_j} f^{-1}(S_j)$ is covered by the open affines $S' \times_{S_j} U_{ji}$, $i = 1, \ldots t_j$ and the intersections $$ \bigcap\nolimits_{i \in I} S' \times_{S_j} U_{ji} = S' \times_{S_j} \bigcap\nolimits_{i \in I} U_{ji} $$ are covered by the same number of affines as before the base change. Applying Lemma \ref{lemma-vanishing-nr-affines-quasi-separated} we get $H^p(X', \mathcal{F}') = 0$. By the first part of the proof we already know that each $R^qf'_*\mathcal{F}'$ is quasi-coherent hence has vanishing higher cohomology groups on our affine scheme $S'$, thus we see that $H^0(S', R^pf'_*\mathcal{F}') = H^p(X', \mathcal{F}') = 0$ by Cohomology, Lemma \ref{cohomology-lemma-apply-Leray}. Since $R^pf'_*\mathcal{F}'$ is quasi-coherent we conclude that $R^pf'_*\mathcal{F}' = 0$.