In how many ways can I arrange 3 different math books and 6 different history books on my bookshelf, if I require there to be a math book on both ends?
Assuming all of the books are distinguisible
6 ways to have math on each end
then there is 7 books left 7 P 7 = 5040 ways to arrange the 7 books
5040 x 6 = 30 240 ways (I think)