You are given two points representing the number of items sold at a particular price. From these two points a linear demand functions is constructed. You are also given information on the cost of each item so that you can construct a cost function. From the demand function you can form a revenue function and finally the profit function is the revenue minus the cost. This profit function can the be maximized by taking the derivative at setting it to zero.