Bond-Line Structure for an Alkane
There are 2 methyl groups on the second carbon of the main chain, and 1 methyl group on the fourth carbon of the main chain, so 2,2,4-trimethylpentane is correct! If there was a methyl group on the 5th carbon of a pentane, it would be a hexane, so it would not make sense to name it the way your book did.