Concept:Cost of goods sold is the direct cost of inventory sold, calculated using opening stock, purchases, and closing stock.Explanation:Use the formula for cost of goods sold:Cost of goods sold=Opening stock+Purchases−Closing stockSubstitute the given values into the formula:=#4,000+#17,000−#12,000First add the opening stock and purchases:=#21,000−#12,000Then subtract the closing stock:=#9,000Hence, the cost of goods sold is #9,000.Answer:B. #9,000