how to maximize profit with production function with two inputs