Consider the following pair of compounds:

Compounds A and B are both sparingly soluble water. In dilute potassium hydroxide solution, compound B is very soluble but compound A is still sparingly soluble. Explain their difference in solubility in dilute potassium hydroxide solution.