There are 4 books on fairy tales and they have to be put together. They can be arranged in 4! ways.
Similarly, there are 5 novels.They can be arranged in 5! ways.
And there are 3 plays.They can be arranged in 3! ways.
So, by the counting principle all of them together can be arranged in 4!´5!´3! ways = 17280