maximum profit problem

May 2010
A company is selling books. they need to know how much to sell each book for max profit. We are given: At $20 per book they sell 17,800. At $15 per book they sell 22,960. Their cost per book is $4.90. What price should they sell at to get max profit?
I found the slope and then linear equation using those numbers (-1/1032). as well as the y-intercept (37.25)

I know i need to now make it a quadratic equation to find the vertex for max profit. ax^2+bx+c and i know a will be negative. But i don't know what numbers to plug into which parts of the equation. Meaning: what is a, b , c and x? which variables represent cost, price, quantity, etc?
i got slope as -1/1032. so i think for every dollar the price decreases they sell 1032 more books. y-intercept is 37.25. the price when there is zero demand for books.
I'm stuck on what numbers to put into quadratic equation now.
please help, thanks
Feb 2008
1st column = price of books
2nd column = no. of books sold. = -1032*1st column+38440
3rd column = cost of books = 4.9*2nd column
4th column = profit = 3rd column - 2nd column*1st column.

is the equation to the max profit. after putting 1,2,3,4 together.

after rearranging and simplify.

then to find max. you differentiate the equation to
to find x
x= 21.07

hence the max profit = $21

please ask questions if you dont understand as i havent explain it fully.