1, A sued B for infringement.
Patent infringement refers to the act of implementing a patent for the purpose of production and operation without the permission of the patentee.
Implementation here refers to manufacturing, using, promising to sell, selling or importing patented products, or using its patented method and using, promising to sell, selling or importing products directly obtained according to patented methods.
In your example, A's patent belongs to the basic patent and B's patent belongs to the improvement patent. Party A and Party B may cross-license.
Whether A can invalidate B's patent depends on whether B's improvement is creative. If it is an obvious small change, it is not creative and can be invalidated; If the improvement of B has outstanding substantive characteristics and remarkable progress, it is creative and cannot be invalid.