In this reaction, chlorine (Cl$_2$) reacts with sodium hydroxide (NaOH) in the presence of heat and concentration. The products are sodium chloride (NaCl), water (H$_2$O), and sodium chlorate (NaClO$_3$), where chlorine undergoes oxidation to a +5 oxidation state. The balanced chemical equation for the reaction is:
\[
3\text{Cl}_2 + 6\text{NaOH} \xrightarrow{\text{heat, conc.}} 5\text{NaCl} + \text{NaClO}_3 + 3\text{H}_2\text{O}
\]
This shows that chlorine in NaClO$_3$ has an oxidation state of +5.
Thus, the correct compound 'X' is NaClO$_3$, and the oxidation state of chlorine is +5.