I have a question here that i think i am using the wrong formula. Suppose a business sells x gadgets for p=250 - 0.01x dollars apiece, and it costs the business c(x) = 1000 + 25x dollars to produce the x gadgets. Determine the production level and cost per gadget required to maximise profit.

What i was saying is that the profits would be the difference of the selling price - cost to produce. then i would have had to differentiate and equate to zero... but that's giving me a weird undifferentiable answer ... so i think i am wrong. can i get some direction please?