Production = Wells x Barrels per well (4000 = 20 x 200)
Lets say production = y and new wells = x
Since for every new well, we get a decrease of 5 barells
Production = (Wells + New wells) x (Barells per well - 5 barells per new well)
Mathematically, it looks like this:
Differentiate this function and equate it to 0 to find the maximum point, keeping in mind that x indicates # of new wells, not all wells.