Key idea: (Paragraph: strong heating of Q, phthalamide, gives S. S is treated with ethyl 2-bromopropanoate/KOH and then acidified to give T.) This is the Gabriel phthalimide synthesis of an α-amino acid.
On strong heating, phthalamide loses NHX3 to give phthalimide (S):
CX6HX4(CONHX2)X2ΔCX6HX4(CO)X2NH+NHX3
KOH forms the phthalimide anion, which does an SN2 on ethyl 2-bromopropanoate:
CX6HX4(CO)X2NX−+CHX3CHBrCOOEtCX6HX4(CO)X2N−CH(CHX3)COOEt
Acidic hydrolysis frees the amine and the acid:
HX3OX+HX2N−CH(CHX3)−COOH+phthalic acid
T = 2-aminopropanoic acid = alanine, option (B).
Answer: (B)
Tagged Diazonium salts. Machine-assigned, so read it as a strong shortlist rather than a verdict.