A = Permutations that contain $ bge $
We can treat $ bge $ as a single entity.
B = Permutations that do not contain $ bge $
So there’s $ bge, a,c,d,f $ which is 5 entities.
$ |B| = 5! $
$ |S| = $ Total permutations without restrictions
$ |S| = 7! $
$ |\text{Number of permutations that do not contain} bge| = |S| - |B| $
$ |\text{Number of permutations that do not contain} bge| = 7! - 5! $