(a) Working backwards from D
D is a primary amine (it gives N2 and an alcohol with nitrous acid) of formula C3H9N, so D is propan-1-amine or propan-2-amine. Its alcohol gives iodoform, so the alcohol contains CH3CH(OH)–: it is propan-2-ol, and D is propan-2-amine, (CH3)2CHNH2.
Hoffmann degradation replaces –CONH2 by –NH2 on the same carbon skeleton, so the amide C has –CONH2 where D has –NH2: C is 2-methylpropanamide, (CH3)2CHCONH2.
Partial hydrolysis turns –C≡N into –CONH2, so A is 2-methylpropanenitrile, (CH3)2CHCN (formula C4H7N, as required).
LiAlH4 turns –C≡N into –CH2NH2, so B is 2-methylpropan-1-amine, (CH3)2CHCH2NH2.
Check with the straight-chain nitrile, butanenitrile: it would give butanamide and then propan-1-amine, whose alcohol (propan-1-ol) does not give iodoform. So the iodoform clue is what fixes the branched chain.

(b)
(CH3)2CHCONH2+Br2+4NaOH→(CH3)2CHNH2+Na2CO3+2NaBr+2H2O
In Hoffmann degradation the alkyl group migrates from the carbonyl carbon to nitrogen and the carbonyl carbon is removed as Na2CO3, so D has one carbon fewer than C. Reduction of a nitrile only adds hydrogen to the –C≡N carbon and keeps it as –CH2–, so B has the same four carbons as A.