It is enough to show that the intersection of two finitely generated semigroups inside a finitely generated commutative semigroup is not necessarily finitely generated, for then you can consider the semigroup algebras.

So let $A$ be freely generated by $\{y,z\}\cup\{x_n:n\geq1\}$ subject to the relations $yx_n=x_{n+1}$ and $zx_n=x_{n+1}$ for all $n\geq 1$, and $x_nx_m=x_{nm}$ for all $n,m\geq1$ (notice that $A$ in fact coincides with the given set of generators...). Let $A_1$ be the subsemigroup generated by $y$ and $x_1$, and let $A_2$ be the subsemigroup generated by $z$ and $x_1$. Then $A$, $A_1$ and $A_2$ are finitely generated and commutative, yet the intersection $A_1\cap A_2$ is the subsemigroup of $A$ generated by $\{x_n:n\geq1\}$, which is isomorphic to $\mathbb N$ under the product. This is not finitely generated.

**Later:** Yemon asks in a comment if one can change this so that the containing algebra is a domain. I think this works: let $A$ be the algebra generated by $\{y,z,u\}\cup\{x_n:n\geq2\}$ subject to the relations $yx_n=x_{n+1}$ and $zx_n=x_{n+1}+u$ for all $n\geq 2$, and $x_nx_m=x_{nm}$ for all $n,m\geq1$, let $A_1$ be generated by $y$ and $x_2$, and let $A_2$ be generated by $z$, $u$ and $x_2$. (I have to remove $x_1$ for otherwise $x_1(x_1-1)=0$)