I need some help to solve Q6 biii) of this paper, asking about which functional groups are present in E, F, G and H. I got the correct answers thinking that if something reacts with an acid or base, then it dissolves in them. But then I realized that amides and esters also react with both ( though heat is required, so that may be why they aren't said to be soluble ), and I also realized that in general my 'dissolves = reacts' notion is very flawed. So I discarded this concept, and tried to work on it fresh, but I am now very much stuck.
My approach before was this : Esters do not dissolve in cold aqueous bases or acids, nor do amides or alcohols. Amines dissolve in aqueous acids. Phenols and Carboxylic acids dissolve in aqueous bases.
From the molecular formula, we know that each compound contains either an Amine or an Amide functional group, so the rest of it is simply working out which combination fits which functional groups. Thanks!