Compound D is iodoform which is formed with compound B by the reaction of I2 in presence of KOH (ie Iodoform reaction). Hence, compound B must have CH3-CO-group.
Compound B is obtained by the reaction of an acid chloride with benzene in presence of anhydrous AlCl3. So, compound B is C6H5COCl.
Hence,
It is also obtained with compound A by the reaction with dil. H2SO4 in presence of HgSO4. So, compound A is
Compound B gives iodoform test with I2, and KOH(aq)