Let $G$ and $H$ be finite groups.
If there are normal series of $G$ and of $H$ having the same set of factor groups, then $G$ and $H$ have the same composition factors.
Let $$G=G_0\geq\dots\geq G_m=1$$
and $$H=H_0\geq \dots\geq H_n=1$$
be normal series for $G$ and $H$ respectively.
I think that it should be related to Jordan-Holder Theorem.
So I try to "insert" them in the same group which is $G\times H$.
$$G\times H\geq G=G_0\geq\dots\geq G_m=1$$
$$G\times H \geq H=H_0\geq \dots\geq H_n=1$$
are both normal series of $G\times H$.
By Schreier Refinement Theorem, they have refinements that are equivalent.
I am not sure whether I prove in wrong direction. Also up to here I still haven't use the assumption that $G,H$ have same set of factor groups.
Remark: This problem is from exercise 5.11, An Introduction to the theory of groups by Rotman (page 101)