(i) Solution of X (with HCl) reacts with NaOH and forms white ppt.This ppt dissolves in excess of NaOH to give solution which has strongly reducing nature. This reducing properties of this solution points out that the solution might be containing sodium stannite and here X must be tin.
(ii) The nature of X as tin is confirmed by its reaction with S forming SnS2 which dissolves in yellow ammonium sulphide but regenerates in presence of HCl.
Thus the various reactions and nature of X, Y, and Z can be written as below