Here are some steps you could try.

1. Find the function relating price to quantity sold.

ie. f(price)=quantity

2. Find the functions for gross profit and costs in terms of the above function.

ie. f(price)=gross and f(price)=costs

3. Subtract to get the net profit function.

ie. f(price)=net

4. Differentiate to find the maximum