Application of reactive extraction to recovery of carboxylic acids