Generally alcohols are acidic in nature but they does not react with NaOH solution. Among the given options only phenol is acidic enough to react with NaOH solution.
So, compound 'X' is phenol which is acidic and it is soluble in NaOH solution, but insoluble in NaHCO3 solution. Phenol also gives violet colour with neutral FeCl3 solution according to the following reaction.




