The correct option is A 10C55!4!2!+ 10C76!3!2!
Let first table and second table can accommodate seven persons and five persons respectively.
If A and B are on first table, then remaining five can be selected in 10C5 ways.
Now, 7 persons including A and B can be arranged on the first table in which A and B are together in 2!5! ways. Remaining 5 can be arranged on the second table in 4! ways.
So, total number of ways is 10C54!5!2!.
If A,B are on the second table, then remaining 3 can be selected in 10C3 ways.
Now, 5 persons including A and B can be arranged on the second table in which A and B are together in 2!3! ways. Remaining 7 can be arranged on the first table in 6! ways.
Hence, number of ways for first table is 10C76!3!2!.
Therefore, total number of ways is 10C54!5!2!+ 10C76!3!2!.