Here n(S) = 7!
Let A: 2 persons sit next to each other.
Let the 2 particular persons be together and 5 remaining people, totally 6 can be permuted in 6! ways and 2 particular persons they themselves can be permuted in 2! Ways.
∴ the number of ways is 6! And 2!.