Consider $AC$ as 1 unit and $D$ as another, total $ 2 unit $
It can be arranged in = $2! * 2! = 4$ ways ( second $ 2! $ because AC can we arranged in to ways i,e AC and CA). $\rightarrow (1) $
Now, this arrangement will create three places, i.e $ -- AC -- D--$
Since $B$ and $E$ cannot be adjacent, choose $2$ place out of $3$ = $\binom{3}{2} * 2!$ $\rightarrow (2) $
($2!$ because of BE and EB two arrangement possible).
From $ (1) and (2)$
So total arrangement possible such that $A$ and $C$ are adjacent and $B$ and $E$ are non adjacent
= $ 4 * \binom{3}{2} * 2! $
= $ 24 $