I never liked the definition of formal completion (as defined in EGA or Hartshorne), so I'll use the following definition from Brian's formal GAGA paper.
Definition: Let $X$ be a locally Noetherian scheme, and $I \subseteq \mathcal{O}_X$ a coherent ideal. The formal completion of $X$ along $V(I)$, is the ringed topos $(X_{\text{Zar}}, \varprojlim \mathcal{O}_X/I^{n+1})$.
Note by Theorem 1.5 of the same paper, the category of modules on this definition of formal completion, is equivalent to the category of modules on the usual definition of formal completion as given in Hartshorne or EGA: Namely, the ringed space whose underlying topological space is $X_0 := V(I)$, equipped with the sheaf of rings that sends a Zariski open $U_0 \hookrightarrow X_0$ to $\varprojlim \Gamma(U_n, \mathcal{O}_{U_n})$. Here $U_n$ is the unique Zariski open in $X_n$ lifting $U_0$.
Ok, so now back to your question. We have locally Noetherian schemes $X,Y$ and a morphism of schemes $f : X \to Y$. In addition, we have a coherent ideal $I \in \text{Coh}(Y)$, and we complete $Y$ along $Y' := V(I)$. In addition, we also complete $X$ along $|f|^{-1}(Y')$.
Now we have a map of ringed topoi $\hat{f} : \widehat{X} \to \widehat{\hspace{1mm}Y}$ with underlying functor $u_\hat{f}$ on objects simply given by pullback. Furthermore, by the usual theory, this gives rise to a right derived functor
$$R\hat{f}_\ast : D(\widehat{X}) \to D(\widehat{\hspace{1mm}Y}),$$
on the level of unbounded derived categories of modules.
We want to show for any $\mathcal{F} \in \text{Coh}(\widehat{X})$ that $R^i\hat{f}_\ast \mathcal{F} = 0$ for all $i > 0$. Now since the affines $\operatorname{Spec} B \to Y$ form a base for the Zariski topology on $Y$, and $R^i \hat{f}_\ast \mathcal{F}$ is the sheafification of the presheaf that sends a Zariski open $(\operatorname{Spec} B \hookrightarrow Y)$ to $H^i(u_\hat{f}(\operatorname{Spec} B), \mathcal{F}) = H^i(X_B, \mathcal{F})$ (see here), it is enough to show this last cohomology group is zero.
But this is none other than the i-th cohomology of the sheaf $\mathcal{F}$ on the ringed site $$\widehat{X_B} = (X_B, \varprojlim \mathcal{O}_{X_B}/((f^\ast I)|_{X_B})^{n+1}).$$
As discussed in the beginning of my answer, this is none other than the cohomology of $\mathcal{F}$ on the affine formal scheme $\widehat{X_B}$ in the usual sense. The desired result now follows from the following proposition.
Proposition: Let $A$ be a Noetherian ring an $I \subseteq A$ a finitely generated ideal. Define $X := \operatorname{Spec} A$, $X_n := \operatorname{Spec} A/I^{n+1}$, and $\widehat{X}$ the formal completion of $X$ along $X_0$ (in the sense of Hartshorne). Then for any $\mathcal{F} \in \text{Coh}(\widehat{X})$, we have
$$ H^i(\widehat{X}, \mathcal{F}) = 0$$
for all $i > 0$.
To prove this, let us recall that there is a natural equivalence of categories (Theorem 2.3 of Brian's paper)
$$\text{Coh}(\widehat{X}) \stackrel{\sim}{\to} \varprojlim \text{Coh}(X_n).$$
The functor from left to right is given by reduction mod $I^{n+1}$ (for all $n \geq 0$), and in the other direction we send an adic system to its inverse limit. So now using this equivalence of categories, we must show for $\{\mathcal{F}_n\} \in \varprojlim \text{Coh}(X_n)$ that $$H^i(\widehat{X}, \varprojlim \mathcal{F}_n) = 0.$$
To this end, we invoke the milnor exact sequence:
$$0 \to R^1 \varprojlim H^{i-1}(X_n, \mathcal{F}_n) \to H^i(\widehat{X}, \varprojlim \mathcal{F}_n) \to \varprojlim H^i(X_n, \mathcal{F}_n) \to 0.$$
If $i > 1$, the left and right terms of this sequence vanish by the usual stuff (higher cohomology of any quasi-coherent on an affine is zero). So now we only need to worry about the $i=1$ case. The right dude is still zero so we only need to show that
$$R^1 \varprojlim H^0(X_n, \mathcal{F}_n) = 0.$$
Now I claim that the adic system $\{H^0(X_n, \mathcal{F}_n)\}$ has all transition maps surjective, a fortiori Mittag-Leffler and therefore the $R^1$ thingy must be zero. But now the obstruction to surjectivity of
$$H^0(X_{n+1}, \mathcal{F}_{n+1}) \to H^0(X_n, \mathcal{F}_n)$$
lies in some $H^1$ thingy which is zero for the same reason as before. Boom! The left and right terms in the Milnor exact sequence vanish for all $i > 0$ and we win.