Let $A$ be a finite abelian $p$-group and $x\in A$ an element of order $p$. Assume that have the following exact sequence :
$$1\rightarrow \langle x\rangle \rightarrow A\rightarrow B_1\times B_2\rightarrow 1$$
where $B_1$ and $B_2$ are both abelian $p$-groups. Let $\pi$ be the projection of $A$ onto $B_1\times B_2$. Is it always possible to find $A_1$ and $A_2$ two subgroups of $A$ such that :
$$A=A_1\times A_2\text{ and for $i=1,2$, we have } \pi(A_i)=B_i\text{?} $$
I have made some examples (they are not really interesting in my opinion) and they always work (but they are rather small). The only reason I suspect this to be true is that, somehow it would help me for another problem I am working on.
Of course, a counter-example would be interesting too, so that I do not try to prove something false.
Trying to prove it, I realized that applying some automorphism of $A$, one can choose $A$ and $x$ in a very simple way.
Indeed, it is not so hard to see that decomposing $A$ as a direct product of cyclic groups $\langle e_1\rangle\times\cdots\times\langle e_r\rangle$ and applying some automorphism of $A$, we may assume $x=\frac{o(e_j)}{p}e_j$ for some $1\leq j\leq r$.