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?