If you sell at x per item then your profit is (x-20) per item, your sales are (120-x) and so your total profit is y = (x-20)(120-x). This has a maximum when dy/dx = 0, or at the end points of the range of values of x (don't forget that). The endpoints are x=0, y=-2400 and x=120, y=0. The interesting point if when dy/dx = 140-2x = 0, that is, when x=70; then y=2500. Checking the slope of the graph near this point shows that it is a maximum.

Your analysis maximised not the profit (x-20)(120-x) but the sales revenue x(120-x).