(a) The lone pairs on nitrogen atoms facilitate resonance as the movement of the electrons occurs. A double bond is formed between carbon and nitrogen, whereas the existing carbon-carbon double bond converts into a single bond.

Representation of second resonance structure
(b) The second resonance structure of B cannot be formed because the delocalization of electrons in that structure is not possible.
All the atoms are bonded to the central carbons. The nitrogen atom is hybridized to which hydrogen atoms are attached. Thus, no resonance is possible for structure B.