Optimal rate allocation for production and injection wells in an oil and gas field for enhanced profitability