Iterated semi-direct products Let $G$ be a finite group. Suppose that we can write $G= A \rtimes B$ and also $A = C \rtimes D$. Further suppose that C is normal in $G$ (not just in $A$). Then can we write $G = C \rtimes E$ where $E=G/C$? Of course, if $|C|$ and $[G:C]$ are relatively prime, then this follows from the Schur-Zassenhaus theorem.
We can of course write $G= A \rtimes B = (C \rtimes D) \rtimes B$ and we would like to have some kind of "associativity" of semi-direct product so that 
$G= C \rtimes (D \rtimes B)$. The question is whether the semi-direct product "$D \rtimes B$" actually makes sense (that $D$ and $B$ act on $C$ is clear).
I am mainly interested in whether this works in the case that we have the following extra hypotheses (i) $G$ is soluble, (ii) $C$ is a $p$-group, (iii) $D$ is cyclic of order prime to $p$, and (iv) $B$ is cyclic (the question is only interesting if $p$ divides $|B|$ due to (iii) and Schur-Zassenhaus). We could also strengthen (i) to (v) $C$ is an elementary abelian $p$-group. I don't know whether any of these extra hypotheses are helpful or not. 
One can also phrase the problem in terms of splitting of short exact sequences. One has a commutative diagram 
$
\newcommand{\ra}[1]{\kern-1.5ex\xrightarrow{\ \ #1\ \ }\phantom{}\kern-1.5ex}
\newcommand{\ras}[1]{\kern-1.5ex\xrightarrow{\ \ \smash{#1}\ \ }\phantom{}\kern-1.5ex}
\newcommand{\da}[1]{\bigg\downarrow\raise.5ex\rlap{\scriptstyle#1}}$
$$
\begin{array}{c}
& & 1 & & 1 & & \\
& & \da{} & & \da{} & & \\
& & C & \ra{=} & C\\
 & & \da{} & & \da{} & & \\
1 & \ra{} & A & \ra{} & G & \ra{} & B & \ra{} & 1 \\
 & & \da{} & & \da{\pi} & &  \da{=} \\
1 & \ra{} & D & \ra{} & E & \ra{} & B & \ra{} & 1 \\
 & & \da{} & & \da{} & & \\
& & 1 & & 1 & & 
\end{array}
$$
in which all rows and columns are exact. We are assuming that all the short exact sequences split (including the last row), apart from the one containing $\pi$; we want to show that this one also splits. It is easy to see what the section $\varepsilon: E \rightarrow G$ should be in terms of the other sections, but unfortunately I can't seem to show that it is actually a homomorphism. 
I have the feeling that there is either an easy solution or any easy counterexample satisfying the extra hypotheses above, so I am missing something either way. (I did try some small examples, which seemed to work.)
 A: I believe that it must split if $C$ is abelian.
More precisely, I will prove that if $C$ is an abelian $p$-group and $D$ is a $p'$-group, then $C$ has a complement in $G$ and so $G \cong C \rtimes (D \rtimes B)$. We are assuming that $G$ is finite. Note that under these assumptions $C$ is a characteristic subgroup of $A$, and hence normal in $G$.
There is a general result that says that, if $Q$ is a $p'$-group acting on a finite abelian $p$-group $P$, then $P = C_P(Q) \times [P,Q]$. I don't have a reference to hand, but I know it is in Gorenstein's book on Finite Groups, and I can find the precise reference later. Note that this does not hold in general for nonabelian $p$-groups.
So we have $C=C_C(D) \times [C,D]$.
Now $A/[C,D]$ is the direct product $C/[C,D] \times D[C,D]/[C,D]$. Since $A/D[C,D] \cong C/[C,D]$ is abelian, we have $[A,A] \le D[C,D]$ and so $[C,D] = C \cap [A,A]$ is normal in $G$. 
Since the direct factors $D[C,D]/[C,D]$ and $C/[C,D]$ of $A/[C,D]$ have coprime orders, they are both characteristic in $A/[C,D]$ and hence normal in $G/[C,D]$. In particular,  $D[C,D]/[C,D]$ is normalized by the subgroup $B[C,D]/[C,D]$, which is a complement of $A/[C,D]$ in $G/[C,D]$.
Now the subgroup $BD[C,D]$ of $G$ has contains $B$ and $D$ and intersects $C$ in $[C,D]$. So it satisfies the original hypotheses, but with $C$ replaced by $[C,D]$. So if we now replace $G$ by $BD[C,D]$, we have $C_C(D)=1$.
Now let $N = N_G(D)$. Since, by the Schur-Zassenhaus Theorem, all complements of $C$ in $A$ are conjugate (to $D$), the Frattini Argument shows that $G=AN$,
and hence, since $D \le N$, $G=CN$. Also $[C \cap N,D] \le C \cap D = 1$, so $C \cap N \le C_C(D) = 1$, and hence $C \cap N = 1$. So $N$ is a complement of $C$ in $G$. (It is also a complement of the original $C$ that we replaced by $[C,D]$.) 
Note that this argument doesn't use the facts that $D$ and $B$ are cyclic, but it does use the assumption that $C$ and $D$ have coprime orders.
I do not know whether such an extension always splits when $C$ is allowed to be a nonabelian $p$-group.
A: Without answering your question directly, you may be interested in the paper:
Multiple semidirect products of associative systems. Richard Steiner. Glasgow Mathematical Journal - GLASGOW MATH J 01/1989; 31(03).
Some of the questions you pose also are discussed in, and  are relevant to, work on $cat^n$-groups in homotopy theory. Taking $cat^2$ groups (or equivalently crossed squares) in the sense of Loday, a simple example is a group $G$ together with two specified normal subgroups, $M$ and $N$, (together with their intersection). The commutator between the two normal subgroups yields a map $h: M\times N \to M\cap N$. (Abstracting this a crossed  square has crossed modules, $M\to G$, $N\to G$ and then replacing $M\cap N$ by a more general $L$, two more crossed modules $L\to M$, $L\to N$ and an $h$-map, mimicking the earlier examples. From this set up one constructs a `big group' $(L\rtimes M)\rtimes (N\rtimes G)$ unambigously, i.e. you get an isomorphic group if you work out  $(L\rtimes N)\rtimes (M\rtimes G)$.  
This may seem distant from your specific question but the point is that the axioms of the h-map in a crossed square, encode the compatibility of the actions. This is related to your diagram espeically when $C$ is a central subgroup. Another useful source may be papers on the non-Abelian tensor products of groups, starting probably with:
R. Brown, D. L. Johnson and E. F. Robertson, Some computations of non-abelian tensor products of groups, J. Algebra, 111, (1987), 177 – 202.
Here again questions of the compatibility of the actions is central to the constructions. 
A: Here's a short answer, assuming only that $C$ is an abelian $p$-group and $\vert D \vert$ is relatively prime to $p$.
Remember that $G \cong H\rtimes K$ iff normal subgroup $H$ has a complement in $G$ isomorphic to $K \cong G/H$.  
A theorem of Gaschütz says that a normal abelian $p$-group $C$ has a complement in $G$ if and only if $C$ has a complement in a Sylow $p$-subgroup $P$ containing $C$.  Since $( \vert D \vert, p)=1$, we have that $C$ is a Sylow $p$-subgroup of $A$.  If $P$ is a Sylow $p$-subgroup of $B$, then by counting we get that $CP$ is a Sylow $p$-subgroup of $G$.  Then $P$ is a complement to $C$ in $CP$, hence $C$ has a complement in $G$, as desired.  $\square$
A: Having looked at Derek's answer, I believe that there is another solution that does not assume that $C$ is abelian but does assume some further hypotheses (which may not be necessary, but are true for the application I have in mind). 
To be clear, here is what I am assuming. Suppose that $G$ is finite, $C$ and $D$ are of relatively prime orders and that $B$ is cyclic. Also suppose that all the short exact sequences in the commutative diagram of the question are split, apart from the one containing $\pi$, which is the sequence that we want to show is split. Let $b$ be any generator of $B$. For clarity, let $D'$ denote a subgroup of $A$ that is the imaging of a splitting $D \rightarrow A$, and similarly $E'$ and $B'$ (i.e. $D', B'$ and $E'$ are all subgroups of $G$). EDIT: Suppose that any lift $b'$ of $b$ under the quotient map $G \rightarrow B$ has the same order as $b$. Then we can take $B'=\langle b' \rangle$ END EDIT (maybe this hypothesis always holds for some reason; I know that it holds in the application of interest to me).
Let $N=N_G(D')$. By the same reasoning as in Derek's answer, we have $G=AN$ (note that because we are using the part of the Schur-Zassenhaus Theorem regarding conjugate complements, we should assume that either $A$ or $D$ are soluble, but I am fine with this). So there exists $b' \in N$ that maps to $b$ under the quotient map $G \rightarrow B$. Now take $B'=\langle b' \rangle$, which we can do by the above hypothesis. Thus $B' \leq N=N_G(D')$ and so $E':=D'B'$ is a subgroup of $G$. But $A \cap B'=1$ and $D' \leq A$, so we have $D' \cap B'=1$ and so $|E'| = |B||D|$. Now $G=AB'=(CD')B'=C(D'B')=CE'$. Furthermore, $|G|=|C||E'|$, which with $G=CE'$ forces $C \cap E'=1$  . Thus $E'$ is the desired complement of $C$ in $G$.
Does this seem right? Can we get rid of the hypothesis about the choice of splitting $B \rightarrow G$?   
