Costs of chemicals used in making key goods, including pharmaceuticals, rubber, and plastics, are soaring as the rally in crude oil prices this year pushed up the price of petrochemical feedstocks.