Magnesium can be extracted by electrolysis of salts derived from sea water, or, better, from salt…

Magnesium can be extracted by electrolysis of salts derived
from sea water, or, better, from salt lakes such as the Dead Sea. The
electrical energy necessary to electrolytically extract 1 kg of magnesium in
this way is 40 kWh. The current price of magnesium is approximately $5/kg. What
fraction of this price is the cost of the electricity used to make it? If
electricity prices rise by a factor of 3 (responding to similar increases in
the cost of oil or gas), how much will it increase the cost of making
magnesium? Take the price of industrial electricity to be $0.06/kWh.