A real estate developer estimates that if 60 luxury houses are built, the average profit will be $47,500 per house. The average profit will decrease by $500 per house for each additional house built. How many houses should the developer build to maximize total profit?

I set up the equation like this:

P(x) = [47500 - 500( x - 60 )]x

I get the wrong answer though, I need to get 17 or 18.