Text this: Optimal Allocation of Resources in an Open Economic System with Cobb–Douglas Production and Trade Balances