a)
\(Mg\left(OH\right)_2\underrightarrow{t^o}MgO+H_2O\)
\(MgO+H_2SO_4\rightarrow MgSO_4+H_2O\)
\(MgSO_4+BaCl_2\rightarrow BaSO_4\downarrow+MgCl_2\)
\(MgCl_2+2NaOH\rightarrow Mg\left(OH\right)_2\downarrow+2NaCl\)
b)
\(2Al_2O_3\xrightarrow[criolit]{npnc}4Al+3O_2\)
\(2Al+6HCl\rightarrow2AlCl_3+3H_2\)
\(AlCl_3+3AgNO_3\rightarrow Al\left(NO_3\right)_3+3AgCl\downarrow\)
\(4Al\left(NO_3\right)_3\underrightarrow{t^o}2Al_2O_3+12NO_2+3O_2\)
\(Al_2O_3+3H_2SO_4\rightarrow Al_2\left(SO_4\right)_3+3H_2O\)