Average inventory is nothing to do with how many were sold. It is the average level of the goods held in inventory over the year.
The cost of goods sold is the total cost of what was sold during the year.
It will help you to watch my free lectures. The lectures are a complete free course for Paper MA and cover everything needed to be able to pass the exam well.