For the first one...
Since four girls are together, the group is basically one person.
Then there are 6 people.
6! is the same as 720.
Then multiply that by 24 again to get the total number of ways to arrange the boys and girls with the constraints.
There are 17280 ways to arrange the boys and girls.
If you start to construct a five digit palindrome then the first digit can be any digit from 1 to 9. That is, there are nine choices for the first digit, which must then also be the fifth digit.
For the second digit you can choose any digit from 0 to 9 so there are ten choices for the second digit. This digit must also be placed in the fourth position if the number is to be a palindrome.
By the same reasoning there are ten choices for the third digit and this completes the number. Thus there are 9 x 10 x 10 = 900 choices for the first three digits and hence 900 five digit palindromes greater than or equal to 10,000.
Source and credits: