You might break this down. At the highest level there's only 2 sets:
Seats #1, 2, 3, 4, 5, 6 would be:
Gnome, Elf, Gnome, Elf, Gnome, Elf
Since gnomes can't sit next to gnomes and elves can't sit next to elves, the only other alternative for seats would be:
Elf, Gnome, Elf, Gnome, Elf, Gnome
We did that by moving the gnome to seat #2. But moving it to seat #3 would be a repeat of the first set mentioned. So there's only 2.
Now we have 2 * (TBD)
For each of the 2 sets above, the gnomes can be arranged and the elves can be fixed in their position.
So just line gnome1, gnome2, gnome3 and then rearrange them.
That's 3P3 = 3! = 3*2 = 6
So if the elves are fixed, there are 6 gnome variations.
But wait...the elves can vary too:
They also can be 3P3 = 6 with the gnomes fixed in their position.
So do 6 * 6 = 36 variations
But wait...we had 2 arrangements in the very beginning. One where gnome was at the very beginning and another where gnome was in the #2 spot.
SO take 36 * 2= 72
72 arrangements: 2 sets of 6 variations on 6 variations
For more information on permutations/combinations, try this free lesson on permutations/combinations
from GMAT Pill
... and more
What's Inside GMAT Pill?
Zeke Lee, GMAT Pill Study Method (Study Less. Score More.)
GMAT Pill Reviews | GMAT PILL Free Practice Test