If we consider the letters 'OMORFADWRA' then we have the following: The subword 'OMORFA' is contained in $5!$ rearrangements. The subword 'DWRA' is contained in $7!$ rearrangements. Since at 'OMORFA' we have twice the letter O we get $\frac{7!}{2}$ rearrangements. We have calculated twice 'OMORFADWRA' and twice 'DWRAOMORFA'.
So the total amount of rearrangements that contain either the word 'OMORFA' or the word 'DWRA' or but not both of them is equal to $5!+\frac{7!}{2}-2-2$, or not?
Yes, that's correct. ${{{{{}}}}}$