When metal X reacts with dilute HCl, bubbles of gas Y are formed. Moreover, when this metal X reacts with cold water, it will again produce gas Y. Identify X and Y.
2Na(s) + 2HCl(g)→2NaCl(s) + H2(g)
Moreover, when it reacts with the cold water it will form sodium hydroxide and hydrogen gas. The hydrogen gas formed immediately catches fire because this reaction generates a lot of heat.
2Na(s) + H2O(l) → 2NaOH(aq) +H2(g)
So, X is sodium and Y is hydrogen.