Write me a formula

Job ID: 36220279

Budget: $10 – $30 AUD

I need someone to write a formula for me.

I have 4 sets of data each set of data has 3 columns.
Column 1 = item name
Column 2 = item cost
Column 3 = item value

I need to buy 2 items from each set of data so that I buy 8 items in total.

I need to be able to maximise the item value of the 8 items I purchase but cannot spend more than a certain amount.