It depends on whether or the each seat at a table is unique. What I mean is that if we consider the tables to have chair1, chair2, chair3, etc... we get a different answer than if we just think of the tables as having 5 or 7 chairs. In other words, does seating the people in the same order but shifting everyone over to the right or the left count as the same arrangement or not?

If we're only concerned about which people are next to each other and not which particular chairs they occupy, then we have 12c5 (or 12c7) ways to divide them into groups of 7 and 5. Then we have 6! ways to arrange the people at the larger table and 4! ways to arrange the people at the smaller table.

This gives us (12c5)*6!*4!, which will be a huge number.

If we care about which chairs they occupy, then the 6! and 4! become 5! and 7!. They would cancel out with the denominator in 12c5, so we would just get 12!.

These calculations seem right to me for these 2 different cases. What do you think?