A hint to get started
Keep a fixed-order block and separate two books
4 distinct green books, 4 distinct blue books and 2 distinct red books are arranged on a shelf. The green books are always placed together in the same order, but the red books are always separated. Calculate the number of ways in which this can be done.
CJC · Discussion · Question 6
Arrange the non-red objects first, then use different gaps.