Yes, these answers are opf course correct.
One way to look at it is to imagine his CDs in equal size boxes and he has 4 boxes of pop, 3 boxes of rock and one box of classical. That's 8 boxes in total. He has 80 CDs in total so each of the boxes 10 CDs.
So that's 40, 30, 10. That's exactly what redcrx did and I'm sure the others did it pretty much the same way.