In how many ways can 5 boys and 4 girls be arranged on a bench if

(a) a boy and a girl wish to stay together
(b) 2 boys wish to stay together
(c) 2 girls wish to stay together

you just need to think on these a bit.

a boy and a girl can be chosen in 5*4=20 ways
Once chosen, they count as a single person with 7 others, so there are 20*7! ways to arrange them

now use the same logic, deciding how many ways 2 boys/girls can be chosen (order matters!)