Let the fruit grower use x bags of brand P and y bags of brand Q.
The problem can be formulated as follows. Minimize z = 3x + 3.5y … (1) subject to the constraints,

The feasible region determined by the system of constraints is as follows.

The corner points are A (240, 0), B (140, 50), and C (20, 140).
The values of z at these corner points are as follows.

The maximum value of z is 470 at (40, 100).
Thus, 40 bags of brand P and 100 bags of brand Q should be added to the garden to minimize the amount of nitrogen.
The minimum amount of nitrogen added to the garden is 470 kg.