The correct answer among the choices given above is the last option. When an acid reacts with an active metal, hydrogen gas is produced. The hydrogen in acid is displaced by the metal yielding hydrogen gas.
Mg + 2HCl = MgCl2 + H2
Double replacement because H and K are both switching