Since the metal forms the hydroxide #"XOH"#, it must be an alkali metal.
That means the gas it creates is hydrogen, #"H"_2#.
The unbalanced equation is
#"X" color(white)(l)+ "H"_2"O" → "XOH" + "H"_2#
Step 1. Start by putting a #1# in front of the most complicated formula. Let's pick #"H"_2"O"#.
#"X" color(white)(l)+ color(red)(1)"H"_2"O" → "XOH" + "H"_2"O"#.
Step 2. Balance #"O"#.
Put a 1 in front of #"XOH"#.
#"X"color(white)(l) + color(red)(1)"H"_2"O" → color(blue)(1)"XOH" + "H"_2#
Step 3. Balance #"H"#.
There is no way to balance #"H"# without using fractions.
We start over, multiplying all our old coefficients by #2#.
#"X"color(white)(l) + color(red)(2)"H"_2"O" → color(blue)(2)"XOH" + "H"_2#
Now, we have fixed 4 #"H"# atoms on the left and 2 on the right.
We can get 4 #"H"# atoms on the right by putting a 1 in front of #"H"_2#.
#"X"color(white)(l) + color(red)(2)"H"_2"O" → color(blue)(2)"XOH" + color(orange)(1)"H"_2#
Step 4. Finally, balance #"X"#.
Put a #2# in front of #"X"#.
#color(green)(2)"X" + color(red)(2)"H"_2"O" → color(blue)(2)"XOH" + color(orange)(1)"H"_2#
The equation should now be balanced.
Step 5. Check that atoms balance.
#"Atom"color(white)(m)"LHS"color(white)(m)"RHS"#
#stackrel(————————)(color(white)(m)"X"color(white)(mmm)2color(white)(mmll)2)#
#color(white)(m)"H"color(white)(mmm)4color(white)(mmll)4#
#color(white)(m)"O"color(white)(mmm)2color(white)(mmll)2#
All atoms balance.
The balanced equation is
#2"X" + 2"H"_2"O" → 2"XOH" + "H"_2#