Question 847194
What does it mean to have a profit?  It is our revenue - cost.

What is our revenue?  It's the # of tables * how much we sold them for.

So our revenue we'll call R(x) =  (300-2x)*x

Our cost, we'll call C(x) =  4000.

So P(x) =  R(x) - C(x)  

Putting this together we get P(x) =  (300-2x)*x - 4000 =  {{{-2x^2 +300x - 4000}}}

Just for fun, this would mean that he would make a profit selling between 15 and 135 pesos.