Here are some steps you could try.
1. Find the function relating price to quantity sold.
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.
4. Differentiate to find the maximum