7!-2.(5!)=4800 which is not the answer
:-(
Find the number of permutations of letters a,b,c,d,e,f,g such that neither the pattern 'beg' nor 'cad' appears
Ans:4806
total ways is 7!
no of ways where beg appears is 5! and same with cad
now what you missed out is adding back the ways where both beg and cad appear whcih is 3!
Hence the answer should be 4806