The number of ways that N people can sit at a round table is (N-1)!, assuming that the only important things is the relatie position of each person. So for example for 3 people there are only 2 arrangements: either B sits to A's left and C to A's right, or vice vesa. One way to think of it us that the first person can sit anywhere - it doesn't matter in which sea - then the 2nd person can sit in any one of (N-1) remaining seats, the third in (N-2) remaining seats, etc.

The solution as shown considers that there are two possible cases: 1 person sits at one table and 4 at the other, or 2 people sit at one table and 3 at the other. It does not matter which table is which, so if person A sits at table 1 and persons B, C, D and E at table 2 it's the same as person A sitting at table 2 and persons B, C, D and E sitting at table 1. For the case of 1 person at one of the tables there are C(5,1) was to choose who that 1 person is, and (N-1)! = 0! ways to arrange that one person at his table. Then for the remaining 4 people there are (N-1)!=3! ways to arrange them at the other table. For the case of 2 people at one of the tables there are C(5,2) ways to pick those two people, and (N-1) = 1! ways to arrange them at that table, and then 2! ways to arrange the other three at the other table. Hope this helps!