Let $\alpha$ be a $\bar{\partial}$-closed form. Denote its Dolbeault cohomology class by $[\alpha]_{\bar{\partial}}$ and its Aeppli cohomology class by $[\alpha]_A$; note that the map $g$ is given by $g([\alpha]_{\bar{\partial}}) = [\alpha]_A$. Likewise, if $\alpha' \in \ker\bar{\partial}\cap\operatorname{im}\partial$, then let $[\alpha']_B$ denote the corresponding element in $B^{\bullet,\bullet}$, then $f$ is given by $f([\alpha']_B) = [\alpha']_{\bar{\partial}}$.
As you noted, if $[\alpha]_{\bar{\partial}} \in \ker g$, then $\alpha = \partial\beta + \bar{\partial}\gamma$, so $[\alpha]_{\bar{\partial}} = [\partial\beta + \bar{\partial}\gamma]_{\bar{\partial}} = [\partial\beta]_{\bar{\partial}}$. Moreover, since $\bar{\partial}\alpha = 0$, we see that $\bar{\partial}\partial\beta = 0$ and hence $\partial\beta \in \ker\bar{\partial}\cap\operatorname{im}\partial$. Therefore, we can form the element $[\partial\beta]_B$ which satisfies $f([\partial\beta]_B) = [\partial\beta]_{\bar{\partial}} = [\alpha]_{\bar{\partial}}$, so $[\alpha]_{\bar{\partial}} \in \operatorname{im}f$ and hence $\ker g \subseteq \operatorname{im}f$.
Suppose now that $[\alpha]_{\bar{\partial}} \in \operatorname{im}f$, then $\alpha = \partial\beta$ with $\bar{\partial}\partial\beta = 0$. As $\alpha \in \operatorname{im}\partial + \operatorname{im}\bar{\partial}$, we see that $g([\alpha]_{\bar{\partial}}) = [\alpha]_A = [\partial\beta]_A = 0$, so $[\alpha]_{\bar{\partial}} \in \ker g$ and hence $\operatorname{im}f \subseteq \ker g$.