The general inflation rate of 8% is the average inflation rate. Just as in real life, it does not mean that everything inflates at 8% – some things inflate more and some things inflate less.
Here, you are specifically told that some things inflate at 10% and some things inflate at 5%, so those are the rates to apply to those items. You would only apply 8% to any items that you were told inflated at the general rate of inflation.