First suppose for any finite R-module N, \operatorname{H}^{i}_\mathfrak{a}(N,M) is \mathfrak{a}-cofinite for all i\geq 0. Let N=R, then it follows by Theorem 3.4, that \operatorname{Ext}^i_R(R/\mathfrak{a} ,M) is finite R-module for all i\geq 0.
To prove the converse we use induction on i. Let i=0, then it follows by Lemma 3.5 (a) that
\operatorname{H}^{0}_\mathfrak{a}(N,M)=\Gamma_{\mathfrak{a}}(N, M)\cong \operatorname{Hom}_{R}(N, \Gamma_\mathfrak{a} (M)).
Since \Gamma_{\mathfrak{a}}(M) is \mathfrak{a}-cofinite by Theorem 3.4, so the assertion follows by [BA, Theorem 4.1], [Mel1, Corollary 2.7] and [Mel, Theorem 7.4], respectively in the cases (a), (b) and (c). Now assume that i> 0 and that the claim holds for i-1. Since \operatorname{\Gamma}_{\mathfrak{a}}(M) is \mathfrak{a}-cofinite and \operatorname{Ext}^i_R(R/\mathfrak{a} ,M) is finite R-module for all i\ge 0. Using the short exact sequence
0\longrightarrow \operatorname{\Gamma}_{\mathfrak{a}}(M)\longrightarrow M \longrightarrow M/\operatorname{\Gamma}_{\mathfrak{a}}(M)
\longrightarrow 0,
it is easy to see that the R-modules {\operatorname{Ext}}^{i}_R(R/{\mathfrak{a}},M/\operatorname{\Gamma}_{\mathfrak{a}}(M)) are finite for all i\ge 0. Now, by applying the derived functor \Gamma_{\mathfrak{a}}(N,-) to the same short exact sequence and using Lemma 3.5 (b), we obtain the long exact sequence
\dots \longrightarrow \operatorname{Ext}_R^i(N,\operatorname{\Gamma}_{\mathfrak{a}}(M))\overset{f_i}
\longrightarrow \operatorname{H}^{i}_\mathfrak{a}(N,M)\overset{g_i}\longrightarrow \operatorname{H}^{i}_\mathfrak{a}(N,M/\operatorname{\Gamma}_{\mathfrak{a}}(M))\overset{h_i}\longrightarrow \operatorname{Ext}_R^i(N,\operatorname{\Gamma}_{\mathfrak{a}}(M))\overset{f_{i+1}}\longrightarrow\operatorname{H}^{i+1}_\mathfrak{a}(N,M)\longrightarrow\dots
which yields short exact sequences
0\longrightarrow \operatorname{Ker}{f_i}\longrightarrow \operatorname{Ext}_R^i(N,\operatorname{\Gamma}_{\mathfrak{a}}(M)) \longrightarrow \operatorname{Im}{f_i}
\longrightarrow 0,
0\longrightarrow \operatorname{Im}{f_i}\longrightarrow \operatorname{H}^{i}_\mathfrak{a}(N,M) \longrightarrow \operatorname{Im}{g_i}
\longrightarrow 0
0\longrightarrow \operatorname{Im}{g_i}\longrightarrow \operatorname{H}^{i}_\mathfrak{a}(N,M/\operatorname{\Gamma}_{\mathfrak{a}}(M)) \longrightarrow \operatorname{Ker}{f_{i+1}}
\longrightarrow 0.
Since \operatorname{Ext}_R^i(N,\operatorname{\Gamma}_{\mathfrak{a}}(M)) is \mathfrak{a}-cofinite R-module for all i\ge 0 by [BA, Theorem 4.1], [Mel1, Corollary 2.7] and [Mel, Theorem 7.4], respectively in the cases (a), (b) and (c), it follows by definition that, \operatorname{H}^{i}_\mathfrak{a}(N,M) is \mathfrak{a}-cofinite R-module if and only if \operatorname{H}^{i}_\mathfrak{a}(N,M/\operatorname{\Gamma}_{\mathfrak{a}}(M)) is \mathfrak{a}-cofinite R-module for all i\ge 0. Therefore it suffices to show that \operatorname{H}^{i}_\mathfrak{a}(N,M/\operatorname{\Gamma}_{\mathfrak{a}}(M)) is \mathfrak{a}-cofinite R-module for all i\ge 0. To this end consider the exact sequence
0\longrightarrow M/\operatorname{\Gamma}_{\mathfrak{a}}(M)\longrightarrow E \longrightarrow L
\longrightarrow 0,\,\,\,\,\,\,\,\,(\dagger)
in which E is an injective \mathfrak{a}-torsion free module. Since \operatorname{\Gamma}_{\mathfrak{a}}(M/\operatorname{\Gamma}_{\mathfrak{a}}(M))= 0= \operatorname{\Gamma}_{\mathfrak{a}}(E), thus \operatorname{Hom}_R(R/\mathfrak{a},E)=0 and \operatorname{\Gamma}_{\mathfrak{a}}(N, M/\operatorname{\Gamma}_{\mathfrak{a}}(M))= 0= \operatorname{\Gamma}_{\mathfrak{a}}(N, E) by Lemma 3.5 (a). Applying the derived functors of \operatorname{Hom}_R(R/\mathfrak{a},-) and \Gamma_{\frak{a}}(N,-) to the short exact sequence (\dagger) we obtain, for all i> 0, the isomorphisms
\operatorname{H}^{i-1}_\mathfrak{a}(N, L)\cong \operatorname{H}^i_\mathfrak{a}(N,M/\operatorname{\Gamma}_{\mathfrak{a}}(M)).
{\operatorname{Ext}}^{i-1}_R(R/{\mathfrak{a}},L)\cong {\operatorname{Ext}}^{i}_R(R/{\mathfrak{a}},M/\operatorname{\Gamma}_{\mathfrak{a}}(M)).
From what has already been proved, we conclude that {\operatorname{Ext}}^{i-1}_R(R/{\mathfrak{a}},L) is finite for all i>0. Hence \operatorname{H}^{i-1}_\mathfrak{a}(N, L) is \mathfrak{a}-cofinite by induction hypothesis for all i>0, which yields that \operatorname{H}^i_\mathfrak{a}(N,M/\operatorname{\Gamma}_{\mathfrak{a}}(M)) is \mathfrak{a}-cofinite for all i\ge 0, this completes the inductive step.