This is closely related to the resolution property [Tag 0F85], so it won't be true in complete generality. Indeed, if $\mathscr F$ is a coherent sheaf on $X = S$ that cannot be given as a quotient of a vector bundle $\mathscr E$ on $S$, then $Y = \mathbf{Spec}_X \operatorname{Sym}^* \mathscr F$ cannot be embedded into $\mathbf V_X(\mathscr E) = \mathbf{Spec}_X \operatorname{Sym}^* \mathscr E$ for any vector bundle $\mathscr E$ on $X$ (at least if $S$ is quasi-compact, to be safe). In addition, existence of $\mathscr E_1$ and $\mathscr E_2$ imply that $f$ is of finite presentation, which is not automatic (the assumptions in the notes only imply that $f$ is of finite type).
However, assuming everything is of finite presentation, it is ok when $S$ is affine, so in particular you can do this locally on $S$. Indeed, we can mimic the proof of [Tag 0F87]: since $X$ is projective over affine, it has an ample line bundle, and we will use this to construct $\mathscr E_1$ and $\mathscr E_2$.
Under the equivalence of [Tag 01SA], we can view $f \colon Y \to X$ as the quasi-coherent sheaf of $\mathcal O_X$-algebras $\mathscr A = f_* \mathcal O_Y$. Since $f$ is of finite presentation, there exists a finite open cover $X = U_1 \cup \cdots \cup U_r$ and isomorphisms
$$\mathscr A\big|_{U_i} \cong \mathcal O_{U_i}\big[x_{i,1},\cdots,x_{i,r_i}\big]\big/\big(f_{i,1},\cdots,f_{i,s_i}\big).$$
By property (5) of [Tag 01Q3], there exists $n \in \mathbf Z$ such that the image of
$$\mathscr E_1 := \Gamma\big(X,\mathscr A(n)\big)\otimes \mathcal O_X(-n) \to \mathscr A$$
contains all $x_{i,j}$. Then the map $\phi \colon \operatorname{Sym}^* \mathscr E_1 \to \mathscr A$ is surjective by the choice of the $x_{i,j}$, giving a closed immersion $Y \hookrightarrow \mathbf V_X(\mathscr E_1)$. Likewise, setting $\mathcal I = \ker(\phi)$ gives an $m \in \mathbf Z$ such that the image of
$$\mathscr E_2 := \Gamma\big(X,\mathcal I(m)\big) \otimes \mathcal O_X(-m) \to \mathcal I$$
contains elements mapping to each $f_{i,j}$. This gives a morphism of $\mathcal O_X$-algebras $\psi \colon \operatorname{Sym}^* \mathscr E_2 \to \operatorname{Sym}^* \mathscr E_1$ such that the extended ideal of $\operatorname{Sym}^{>0} \mathscr E_2$ is $\mathcal I$. In other words, $Y$ is the preimage of the zero section under $\mathbf V_X(\mathscr E_1) \to \mathbf V_X(\mathscr E_2)$. $\square$