Well for your first one, know the order which the subshells fill up.
1s2 2s2 2p6 3s2 3p6 3d5 4s2
The energy levels relatively go up, but the 4s subshell is in a lower energy level then the 3d subshell, so gets filled up with electrons first.
And:
Mg + 2HCl -> MgCl2 + H2
0 +1 -1 +2 -1 0
oxidation numbers, Mg is oxidised, Hydrogen is reduced...
Bubbles can be seen, due to the hydrogen gas.
Metal disappears, because it goes into a metal salt which is aqueous.
Mg + 2HN03 -> Mg( N03) 2 + H2
again, whats reduced what do you see happen ect.