They are the light reactions and calvin cycle. The products from light reactions are ATP and NADPH
So they can defend themselves
The plants absorb the nitrogen from the atmosphere and it transports down into the soil where the nitrogen-fixed bactera changes the form of the nitogen:)