Concept:Cost of goods sold is the cost of goods available for sale that were actually sold during the period.Explanation:Step 1: Write the formula.Cost of goods sold=Opening stock+Purchases−Closing stockStep 2: Substitute the given values.=N4,000+N17,000−N12,000Step 3: Add opening stock and purchases.=N21,000−N12,000Step 4: Subtract closing stock.=N9,000Answer:B. ₦9,000