Part A) You will need 8 packages of notebooks
Because you need to find the LCM (Least Common Multiple) which is the smallest number that each number can be divided into. That number would be 48, which is 3 boxes of pencils (16*3) and 8 packages of notebooks (6*8)
Part B) $34 would be how much you'll pay after the sale
Here's the math:
You have 3 boxes of pencils costing $3 each, but you'll have one for free because of the buy one get on free sale, so that's $6 you owe so far.
Next, you have 8 packages of notebooks worth $7 each. This time you only have to pay for 4 of them since you get a free one for every package you buy.
So, 4 packages at $7 each is a total of $28.
Now, we add the two totals ($6 and $28) and we get our answer: $34