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.
Topic: Nucleophilic addition reactions of carbonyl compounds