How many ways can six people sit around a table, if person 1 isn't next to person 4 and person 5 isn't next to person 6? It's only about the order in which people sit around the table, not which seat they are sitting in. So if all the people will move one seat to the left, it's still the same.
Assuming that clockwise and anticlockwise sense is different:
We first find out all possible cases without considering the 2 restrictions (1 isn't next to 4 and 5 isn't next to 6) and subtract all the extra cases.
total number of ways of arranging 6 people around a table = 5!
number of ways where 1 and 4 are together = 4!*2
number of ways where 5 and 6 are together = 4!*2
But notice that we have considered the cases where both 1 , 4 and 5 , 6 are together simultaneously 2 times. So we must add that case to get the final answer
number of ways where both 1,4 and 5,6 are together = 3!*2*2
So the final answer is = 5!-4!*2-4!*2+3!*2*2 =48