Since the price of saltpetre is unknown, let's assign this to be x. Then, there's a relationship between x and the price of nitruous oxide. So, it would be best to solve for the price of nitrous oxide first:
$2160/10 = $216 per gram nitrous oxide. If 20% of the price is profit, that means the original price is the 80%. So, 0.8($216) = $172.8. This is the price of nitrous oxide per gram.
We can now find for x. The statement says:
x = 3*price of nitrous oxide
x = 3*$172.8
x = $518.4 per gram saltpetre
But we have to determine how much of the saltpetre was used in the mixture through the ratio:
2/3 = amount of saltpetre/10 g
amount of saltpetre = 6.67 g
Thus the cost price of saltpetre is
$518.4 per gram saltpetre * 6.67 g = $3,456