$A$ and $B$ are two subnormal $p$-subgroups of $G$, how to show that $\langle A,B\rangle$ is a $p$-subgroup of $G$?
It is not true in general if $A$ and $B$ are not subnormal. For example, $A:=\langle (12)\rangle$ and $B:=\langle (13)\rangle$ are two $2$-subgroups of $G:=S_3$, but $\langle A,B\rangle=G$ is not a $2$-group.
I know that since $A$ and $B$ are subnormal in $G$, $A$ and $B$ are contained in $O_p(G)$. That perhaps helps, but I don’t know what to do with it.
Thank you!
$A$ and $B$ must lie in $O_p(G)$. We can actually generalize this to $\pi$ being a set of primes. What we will use is the fact that if $X$ is a characteristic subgroup of $Y$, and $Y \unlhd Z$ then $X \unlhd Z$, Here $X$ is characteristic in $Y$ if every automorphism of $Y$ maps $X$ onto $X$ and we write $X$ char $Y$.
Now recall that $O_\pi(G)$ is the unique largest normal $\pi$-subgroup of $G$ (or, differently put, it is the intersection of all Hall $\pi$-subgroups). One can easily show that $O_\pi(G)$ is characteristic in $G$.
Let $S$ be a subnormal $\pi$-subgroup of $G$, say $S=H_0 \lhd H_1 \lhd \cdots \lhd H_r=G$. Since $S$ is normal, $S \subseteq O_\pi(H_1)$. Observe that $O_\pi(H_1) \text{ char } H_1 \lhd H_2$, so $O_\pi(H_1) \lhd H_2$ and this yields $O_\pi(H_1) \subseteq O_\pi(H_2)$. In its turns, $O_\pi(H_2) \text{ char } H_2 \lhd H_3$, so $O_\pi(H_2) \lhd H_3$ and this yields $O_\pi(H_2) \subseteq O_\pi(H_3)$. Now work up your way till $H_r=G$ is reached and we conclude $S \subseteq O_\pi(H_1) \subseteq O_\pi(H_2) \subseteq \cdots \subseteq O_\pi(G)$.
As a corollary we can also conclude that the subgroup generated by two subnormal $\pi$-subgroups of $G$ is again a $\pi$-subgroup.