C₆H₅COOH + NaOH → C₆H₅COONa + H₂O
Benzoic acid is a weak acid, which means that it does not completely dissociate in water. However, it is still able to react with NaOH because NaOH is a strong base. Strong bases completely dissociate in water, which means that they produce hydroxide ions (OH-) when dissolved in water. These hydroxide ions react with the hydrogen ions (H+) from benzoic acid to form water.
The product of the reaction between benzoic acid and NaOH is sodium benzoate, which is a salt. Salts are soluble in water, so sodium benzoate will dissolve in the water that is produced by the reaction.
Therefore, benzoic acid is soluble in NaOH because it undergoes a chemical reaction with NaOH to form sodium benzoate and water. The sodium benzoate is soluble in water, so the overall reaction results in the dissolution of benzoic acid in NaOH.