This is really a mathematical question, not a photography question. You have the choice of Permutation - Wikipedia and Combination - Wikipedia. A combination just counts the people, while a permutation also includes the sequence in which they stand. Clearly combinations are easier. The formula is n!/(k!*(n-k)!). ! is the Factorial - Wikipedia function, the number multiplied by all smaller numbers. Let's take the individual cases:
1. Bride must be in the picture. That means 5 others out of 9. So if you have 9 people and you want to choose 5, the number is 9!/(5!*(9-5)!), or 362880 / (120 * 24), or 126. This is often written 9C5
2. Both bride and groom must be in the picture. In this case you need 4 others out of 8, so the combination formula is 8C4, or 70.
3. Either bride or the groom must be in the picture, but not both. That means 5 other people out of 8, or 8C5, 56.
I’ll leave the permutations as an exercise for the reader. My (cheap) scientific pocket calculator has convenient functions on the keyboard. If you have a scientific calculator, yours might too.