Few ways to do this First is the number of permutation where b appear before d, is same as the number of permutation where d appear before a d= total number of permutation /2 as half will have the first case and another half will have the second case.
so $\frac{8!}{2}$ one can try for 3 or 4 numbers and see
Method 2
we have 8 positions we fix d in the first position then we will have 7 positions left for b, and rest all can be arranged in 6! ways
fix d in the second position we have 6 positions left for b, rest in 6! ways
1st = 6!*7
2nd = 6!*6
7th = 6!*1
adding all 6![7+6+5+4+3+2+1] = 6!*$\frac{7*8}{2}$ = $\frac{8!}{2}$