Total arrangements possible - 5! = 120 , A,B,C,D,E
Consider arrangments in which beth and dan together , ie consider them as one unit. A,C,E,|BD| .
Now arrangements possible = 4!*2 = 24*2 = 48 (2 is multiplied as there are 2 ways to arrange the box - |BD| and |DB|)
so now total ways in which they can stand so that B , D are not together = 120 - 48 = 72.