Why is polymer B more dense than polymer A? The official solution is that A has branched / side chains, weak Van der Waals forces between the polymer chains, less compact packing than B, and large inter-chain distances.
B has no branched chains, hydrogen bonds between the polymer chains, compact packing, and small inter-chain distances.

What does a branched chain mean? How does this influence the density? Doesn't B also have side chains?

What does 'compact packing' mean in this case? Does it mean that separate chains are packed closely together, or that in a single chain, the molecules are closer together?
First polymerisation proceeds through free radical mechanism, which may cause intermediate radicals to abstract H from other parts of growing chain, thus creating new branches in the process.
Refer Wikipedia for detailed mechanism.

On the other hand, second polymerisation proceeds through condensation reaction, where no such thing is possible (condensation can occur only at terminals). 

Furthermore, the chains of B interact through H-bonding, which is much stronger than van der Waal interaction of polymer A. This causes chains to come closer and increases the overall density of polymer.