The process includes the following steps:
Step 1: Preparation of sodium hydroxide:
When a concentrated solution of sodium chloride is electrolyzed, it forms sodium hydroxide (NaOH), chlorine gas and hydrogen gas.
Chlorine gas (X) is formed at anode (positive charge) and hydrogen gas at cathode (negative charge)
The reaction takes place is given as:
2NaCl + 2H2O → 2NaOH + Cl2 + H2
Note: The above reaction is called chlor-alkali process.

Step 2: Now, chlorine gas (X) reacts with lime water [Ca(OH)2] to form a compound (Y) that is bleaching powder which is used as bleaching agent in chemical industry.
The reaction that takes place is:
Ca(OH)2 (Limewater) + Cl2 (Chlorine gas, X )→ CaOCl2 (Bleaching powder ,Y)
Thus, X is chlorine gas and Y is bleaching powder (CaOCl2).