\(n_{SO_3}=\dfrac{20}{80}=0,25\left(mol\right)\\ PTHH:SO_3+H_2O\rightarrow H_2SO_4\\ Mol:0,25\rightarrow0,25\rightarrow0,25\\ C_{MH_2SO_4}=\dfrac{0,25}{0,5}=0,5M\\ Mg+H_2SO_4\rightarrow MgSO_4+H_2\uparrow\\ Mol:0,25\leftarrow0,25\\ m_{Mg}=0,25.24=6\left(g\right)\)