10 Students are randomly seated in a row for a photograph. Three of these are very close friends.
What is the probability that exactly two of the three friends will sit next to each other?
The solution that is posted is, The number of ways to choose two friends from the three friends is 3C2. The number of outcomes for which the two chosen friends sit next to each other at one of the ends of the row and the third friend has a non-adjacent seat is 2 x 7 x 2! X 7!, while the number of outcomes for which the two chosen friends sit next to each other but not at one of the ends of the row and the third friend has a non-adjacent seat is 7 x 6 x 2! x 7!. Hence the probability that exactly two of the three friends will sit next to each other is: 3C2 ((2x7x2!x7!) + (7x6x2!x7!)) / 10!
how to get (2x7x2!x7!) + (7x6x2!x7!) ??