First you need to create the demand function to relate revenue to the price increase\decrease. To do this you will need to find another point to calculate the slope. I picked the point 22, 390 ($10 decrease 2 bikes sold increase).
Now I calculate the slope (390-400)/(22-20)=-5. Now you can put this into slope intercept form with the original pts. y-400=-5(x-20) sim: y=-5x+300.
Now we can create the primary function. Profit is Revenue - Cost. What is the revenue in this case? It is number of units sold multiplied by price. This is x*y. Y is related to x via the demand function we just created. What is the cost? The cost is a given, and it is $200. However, we must remember to multiply it by the number of units sold; so for the function the cost is 200x.
So the primary function will be P(x)=x*(-5x+300)-200x. sim: -5x^2+100x
Now we can differentiate and solve for zero to find critical values and possible mins and maxes.
Maximum profit will be made when 10 units are sold. Given our earlier relationship we know that the cost per unit will be $250. The cost will be $2000, so the max profit that can be made is $500.