The only group $G$ with one $A$ and one $B$ as composition factors is $G = A\times B$ (where $A$ and $B$ are non-abelian, finite and simple) Is it true that if $A$ and $B$ are two non-abelian finite simple groups, then the only finite group $G$ which has one copy of $A$ and one copy of $B$ as composition factors is $G = A \times B$? If not, could someone give a counterexample or even better, a reason why this isn't true?
Certainly, these are the two types of extensions we have to consider:
$$1 \to A \to G \to B \to 1$$
$$1 \to B \to G \to A \to 1$$
It seems true so for all the examples I tried, but I don't have definitive proof. 
 A: The answer to the question is yes, the only group with two nonabelian finite simple groups $A$ and $B$ as composition factors is the direct product $A \times B$.
The well-known Schreier Conjecture says that the outer automorphism group of any finite nonabelian simple group is solvable. The conjecture was finally confirmed by the Classification of Finite Simple Groups (of course it would have been much nicer if there a direct proof had been found).
So, in any semidirect product $A \rtimes_\phi B$, for a homomorphism $\phi:B \to {\rm Aut}(A)$, we must have ${\rm Im}(\phi) \le {\rm Inn A}$, and hence $A \rtimes_\phi B \cong A \times B$.
The smallest finite group in which all composition factors are nonabelian and which is not a direct product of simple groups is the wreath product $A_5 \wr A_5 \cong A_5^5 \rtimes A_5$of order $60^6$.
A: Here's an argument that doesn't assume that the extension is split. WLOG, let $A$ be a normal subgroup of $G$, with quotient isomorphic to $B$, both $A$ and $B$ being nonabelian simple (and everything finite). 
Let $C$ be the centraliser of $A$ in $G$. Since $A$ is normal in $G$, so is $C$. Note also that $A\cap C=1$ hence $AC=A \times C$. It also follows that $C$ is isomorphic to a normal subgroup of $B$, so either $C=1$ or $C\cong B$. In the latter case, we get $G\cong A\times B$, as required. Otherwise, $C=1$ and by the N/C Theorem, $G$ embeds in $\mathrm{Aut}(A)$. In fact, a variation of this argument yields that $G/A$ embeds in $\mathrm{Out}(A)$. Now, as Derek pointed out, this $\mathrm{Out}(A)$ is soluble (by the Schreier Conjecture), which is a contradiction.
A: As @Jim says in his comment, $A_5 \rtimes A_5$ works. To spell this out, we have $\operatorname{Aut}(A_5) \cong S_5$, so there is a (unique) nontrivial homomorphism $\varphi : A_5 \to \operatorname{Aut}(A_5)$. The semidirect product $A_5 \rtimes_\varphi A_5$ therefore fits in a short exact sequence $1 \to A_5 \to A_5 \rtimes_\varphi A_5 \to A_5 \to 1$, but $A_5 \rtimes_\varphi A_5 \not\cong A_5 \times A_5$.
Edit: to clarify, the uniqueness of $\varphi$ is not necessary for the argument, but it is cool that this is the unique smallest counterexample.
Correction This is wrong in two ways: first of all, the uniqueness of $\varphi$ is only up to an automorphism of $A_5$ (the image is unique). More importantly, $A_5 \rtimes_\varphi A_5 \cong A_5 \times A_5$, verified by GAP. I'm running a computer search for another counterexample, but this answer should be ignored for now.
