1. Add dilute KOH solution and ether to the mixture.
2. The ether layer will contain A and B will dissolve in the dilute KOH solution.
3. Separate the layers and evaporate the ether layer to get A in pure form.
4. Extract the aqueous layer with ethyl acetate.
5. Evaporate the ethyl acetate layer to get B in pure form.