One of the characterisations of polycyclic groups is that there is a subnormal series $\{1\}=G_n\leq G_{n-1}\leq \ldots \leq G_1\leq G_0=G,$ where each $G_i$ is normal in $G_{i-1}$ with cyclic quotient. This tells you immediately that if $G\rhd N$ and both $N$ and $G/N$ are polycyclic, then $G$ is polycyclic. Finitely generated abelian groups are polycyclic, in particular $A$ and $B$ in your question are, so that gives you what you want.
Edit: The most conceptual explanation of why finitely generated abelian groups are polycyclic is that $\mathbb{Z}$ is a Noetherian ring. An abelian group is the same as a $\mathbb{Z}$-module, and finitely generated modules over Noetherian rings are Noetherian. In other words, any submodule of such a module is finitely generated. In particular, any subgroup of a finitely generated abelian group is itself finitely generated.