Firm A currently dumps 247 tons of chemicals into the local river. Firm B currently dumps 246 tons of chemicals into the local river. The government has decided to reduce the pollution and from now on will require a pollution permit for each ton of pollution dumped into the river. The government gives Firm A 32 pollution permits and gives Firm B 48 pollution permits. The abatement costs of one ton of pollution is $153 for Firm A and $89 for Firm B. What would be the total cost of reducing pollution, if the firms are allowed to trade permits between each other?