X reacts with cold water. Hence , the element should be Calcium
Ca + H2O → Ca(OH)2 + H2
Y reacts with hotwater, Hence, it is "Magnesium"
Mg + H2O → Mg(OH)2 + H2
Z reacts with steam only. Hence , it is Iron
Fe + H₂O → Fe2O3+ H2
Arranging in ascending order (increasing order of reactivity)
Fe < Mg < Ca