Aight I got you:
I did this in a drawing because I must admit, even as a person who loves maths, permutations still really confuse me so, I hope this is self-explanatory.
In essence, you want to first treat the "groups" as one unit that can be swapped around (3!) and subsequently, account for...