A certain commodity is priced at 20% of the profit, and then sold at 80% of the price. As a result, each commodity loses 12 yuan. What is the cost of this commodity?

A certain commodity is priced at 20% of the profit, and then sold at 80% of the price. As a result, each commodity loses 12 yuan. What is the cost of this commodity?

Suppose the cost is x yuan, the price is x * (1 + 20%) yuan, and the selling price is x * (1 + 20%) * 80%
X * (1 + 20%) * 80% + 12 = x, the solution is x = 300