In the following reactions, products A and B are:

Aldol Condensation on the basis of removal of most acidic hydrogen after which, ring formation would take place and then finally dehydration leading to formation of conjugated double bond would be the major product.
Tagged Nucleophilic addition reactions of carbonyl compounds. Machine-assigned, so read it as a strong shortlist rather than a verdict.