Step 1: Reaction of chlorine with cold and dilute NaOH.
When chlorine reacts with cold and dilute sodium hydroxide, it undergoes disproportionation reaction.
The balanced reaction is
\[
Cl_2+2NaOH \rightarrow NaCl+NaOCl+H_2O
\]
Therefore,
\[
A=NaCl
\]
and
\[
B=NaOCl
\]
Step 2: Reaction of chlorine with hot and concentrated NaOH.
When chlorine reacts with hot and concentrated sodium hydroxide, sodium chloride and sodium chlorate are formed.
The balanced reaction is
\[
3Cl_2+6NaOH \rightarrow 5NaCl+NaClO_3+3H_2O
\]
Therefore,
\[
C=NaCl
\]
and
\[
D=NaClO_3
\]
Step 3: Final conclusion.
Hence,
\[
A=NaCl,\quad B=NaOCl,\quad C=NaCl,\quad D=NaClO_3
\]
Therefore, the correct answer is
\[
\boxed{\text{NaCl, NaOCl, NaCl, NaClO}_3}
\]
Hence, the correct option is
\[
\boxed{(2)}
\]