Let $\Phi$ be a system of ideals in a commutative Noetherian ring $R$, and let $\mathscr S$ be a Serre subcategory of $R$-modules. We set
$$
H^i_\Phi(\,\cdot\,,\,\cdot\,)=\varinjlim_{\mathfrak b\in\Phi}\operatorname{Ext}^i_R(R/\mathfrak b\otimes_R\,\cdot\,,\,\cdot\,).
$$
Suppose that $\mathfrak a$ is an ideal of $R$, and $M$ and $N$ are two $R$-modules such that $M$ is finitely generated and $N \in \mathscr S$. It is shown that if the functor $D_\Phi(\,\cdot\,)=\varinjlim_{\mathfrak b\in\Phi}\operatorname{Hom}_R(\mathfrak b,\,\cdot\,)$ is exact, then, for any $\mathfrak b\in\Phi$, $\operatorname{Ext}^j_R(R/\mathfrak b,H^i_\Phi(M,N))\in\mathscr S$ for all $i,j\ge 0$. It is also proved that if there is a non-negative integer $t$ such that $H^i_{\mathfrak a}(M,N)\in\mathscr S$ for all $i$, then $\operatorname{Hom}_R(R/\mathfrak a,H^t_{\mathfrak a}(M,N))\in\mathscr S$, provided that $\mathscr S$ is contained in the class of weakly Laskerian $R$-modules. Finally, it is shown that if $L$ is an $R$-module and $t$ is the infimum of the integers $i$ such that $H^i_{\mathfrak a}(L)\notin\mathscr S$, then $\operatorname{Ext}^j_R(R/\mathfrak a,H^t_{\mathfrak a}(M,L))\in\mathscr S$ if and only if $\operatorname{Ext}^j_R(R/\mathfrak a,\operatorname{Hom}_R(M,H^t_{\mathfrak a}(L)))\in\mathscr S$ for all $j\ge 0$.