make a chart like the one shown below:
50lb bag fertilizer A 50lb bag fertilizer B
nitrogen 8 5 >= 440 pounds
phosphorus 2 5 >= 260 pounds
potassium 4 5 >= 360 pounds
cost 40 30 minimize
x is the number of bags of fertilizer A.
y is the number of bags of fertilizer B.
objective function
minimize cost = 40x + 30y
contraints
8x + 5y >= 440
2x + 5y >= 260
4x + 5y >= 360
x >= 0
y >= 0
graph is shown below:

minimum cost is at (20,56) = 40 * 20 + 30 * 56 = 2480.
all constraints are met.
for example:
8x + 5y = 8 * 20 + 5 * 56 = 440 which is >= 440
2x + 5y = 2 * 20 + 5 * 56 = 320 which is >= 360
4x + 5y = 4 * 20 + 5 * 56 = 360 which is >= 360
once again, when using he desmos.com calculator, you would:
graph the opposite of the inequalities.
the area not shaded is the region of feasibility
evaluate the objective function at each corner point.
corner points of that area will point to the maximum / minimum solution.