The number of arrangements with ABE and HID is $6!$ (including such as CABEGJHIDF, where the two forbidden patterns are not adjacent). Accounting for this, your final count is $$10!-3*8!+7!+6!$$
The number of arrangements with ABE and HID is $6!$ (including such as CABEGJHIDF, where the two forbidden patterns are not adjacent). Accounting for this, your final count is $$10!-3*8!+7!+6!$$