a,
$1\times| Fe^0\to Fe^{+2}+2e$
$1\times| 2H^{+1}+2e\to H_2^0$
$\Rightarrow Fe+2HCl\to FeCl_2+H_2$
b,
$2\times| P^0\to P^{+5}+5e$
$5\times| S^{+6}+2e\to S^{+4}$
$\Rightarrow 2P+5H_2SO_4\to 2H_3PO_4+5SO_2+2H_2O$
c,
$3\times| Mg^0\to Mg^{+2}+2e$
$2\times| N^{+5}+3e\to N^{+2}$
$\Rightarrow 3Mg+8HNO_3\to 3Mg(NO_3)_2+2NO+4H_2O$
d,
$1\times| 2Fe^0\to 2Fe^{+3}+6e$
$3\times| S^{+6}+2e\to S^{+4}$
$\Rightarrow 2Fe+6H_2SO_4\to Fe_2(SO_4)_3+3SO_2+6H_2O$