Answer: 60 gallons of the 20% solution and 120 gallons of the 50% solution should be mixed.
Step-by-step explanation:
Let x represent the number of gallons of 20% solution that should be mixed.
Let y represent the number of gallons of 50% solution that should be mixed.
A 20% solution of fertilizer is to be mixed with a 50% solution of fertilizer in order to get 180 gallons of a 40% solution. This means that
0.2x + 0.5y = 0.4×180
0.2x + 0.5y = 72- - - - - - - - - - - -1
Since the total number of gallons is 180, it means that
x + y = 180
Substituting x = 180 - y into equation 1, it becomes
0.2(180 - y) + 0.5y = 72
36 - 0.2y + 0.5y = 72
- 0.2y + 0.5y = 72 - 36
0.3y = 36
y = 36/0.3
y = 120
x = 180 - y = 180 - 120
x = 60