From the given instruction
Five country music bands and 2 rock bands are signed up to perform at an all-day festival
These are permutations because the order does matter and because the bands are distinguishable from each other.
A. There are no restrictions on the orders
Since there are no restrictions then, all the bands (5 + 2) will play
This can be done in 7! ways
Therefore, the number of = 7 x 6 x 5 x 4 x 3 x 2 x 1 = 5040 0rders
B. all the bands of each type must perform in a row orders
There are two possible orders
1. All the 5 country music bands first, then then the 2 rock band
This can be done in 5! x 2! = 120 x 2 = 240 orders
2. All the 2 rock bands first, then the 5 country music bands
This can be done in 2! x 5! = 2 x 120 = 240 order
Hence, total number of orders will be
240 + 240 = 480 orders