Cost of goods sold is the direct costs attributable to the production of the goods sold in a company.
Cost of goods available for sale (32000 + 39000) = 71000
Less closing stock = 9000
Cost of goods sold = 7100 - 9000
= 62000