Products of o-aminobenzaldehyde thermal treatment with acetone and further with sulfuric acid o-Aminobenzaldehyde is heated along with acetone in dilute $\ce{NaOH}$ solution to produce the major organic product (A), which on treatment with a catalytic amount of $\ce{H2SO4},$ produces another major organic product (B) formed via intramolecular reaction.
What will be the products A and B formed in this reaction?

I have tried solving it and I think A will be o-aminobenzoic acid. But I want to ask that what happens when o-aminobenzoic acid is reacted with catalytic amount of $\ce{H2SO4}?$
This is an example of the Friedländer synthesis of quinolines Wikipedia article  here.

Under catalysis by hydroxide acetone undergoes an aldol condensation with the aldehyde group to give 3, which is your compound A ($\ce{R2=Me, R3=H}$). Under the catalysis of sulfuric acid A loses water to give the quinoline 7 (for your B $\ce{R2 = Me, R3=H}$).

Several reviews of the Friedländer exist, this is a good one Chem. rev. here. 



Image is from ref 1.