Answer : The formula of the gas produced is,
(phosphine gas)
Explanation :
According to the question, when sodium phosphide is treated with water then it react to give phosphine gas and sodium hydroxide.
The balanced chemical reaction will be:

By Stoichiometry of the reaction we can say that:
1 mole of sodium phosphide reacts with 3 moles of water to give 1 mole of phosphine gas and 3 moles of sodium hydroxide.
Thus, the formula of the gas produced is,
(phosphine gas)
The atomic cation with +1 charge with the following configuration:
1s22s22p63s23p6
Is Potassium (K+), remember potassium have 19 electrons in its neutral state, when if losses one electrons it becomes + with one less electron, meaning it will have 18 electrons as a cation.
There are 2 electrons in 1s orbital as it can be seen from the electron configuration.
1. Mg + CuSO4 —> MgSO4 + Cu
=> Single displacement reaction
2. 2HCI + Mg(OH)2 —> MgCI2 + H2O
=> Acid - base reaction
3.AgNO3 + NaCI —> AgCI + NaNO3
=> Double displacement reaction
Ask why you thought would happen didn’t