The reactions, Q to R and R to S, are
Excess adds twice to the ester group , so Q is the tertiary alcohol , where Ar is 4-tert-butylphenyl.
Cold protonates the –OH and water leaves, giving the tertiary carbocation .
This carbocation is held three carbons away from the ring and attacks the ring carbon ortho to the side chain, closing a five-membered ring; loss of restores aromaticity. R is 6-tert-butyl-1,1-dimethylindane, with no –OH and no C=C.
Formation of a C–C bond between an alkyl carbocation and the aromatic ring is an intramolecular Friedel–Crafts alkylation; the loss of water only generates the electrophile, so Q → R is not a simple dehydration to an alkene.
With and anhydrous , the acylium ion substitutes on the aromatic ring of R, giving the aryl methyl ketone S: Friedel–Crafts acylation.
Hence, the correct option is (D).
Tagged Reactions of carboxylic acids. Machine-assigned, so read it as a strong shortlist rather than a verdict.