food=1000-(machines^2)/1000.
(As in some programming languages, ^ here denotes exponent, so (machines^2) is the square of the number of machines. The nonlinearity of this production possibility frontier reflects the assumption of "diminishing returns," a standard assumption in economics since it was introduced by Thomas Malthus. We economists were nonlinear when nonlinear wasn't cool).
This makes the total cost function
cost=machines^2/1000
and the marginal cost function
MC=machines/500.
The total benefit function is
benefit=2.3xmachines-(machines^2)/1000.
(Once again the nonlinearity reflects diminishing returns -- in this case, diminishing marginal benefits).
so that marginal benefit is
MB=2.3-machines/500.
Maximization of benefit-cost gives 575 and substitution of this number into the frontier function gives 669.375.