I would recommend you specifically identify what your "variables" represent. I can see from you first "object function" that x1 is "the number of litres of Item 1", x2 is "the number of litres of item 2" and x3 is "the number of litres of item 3" but it is better to say that explicitely (and it will shock your teacher!).

Yes, the food value in each package is the density in kg/litre times the "food value" per kg giving "food value per litre" and then multiply by the variables in litres, gives "total food value", the quantity you want to maximize.

Now, there are several restrictions: you have to be able to put them all into a "30 litre container" so, since x1, x2, and x3 are measured in litres, you must have . You have available 200 kg of item 1 but since x1 is in litres, you need to multiply by its density: item 1 is .1 kg/litre so 200 kg is (200 kg)/(.1 kg/litre)= 2000 litres. A constraint on x1 is .

Of course, you have similar constraits on x2 and x3.

Notice how I am keeping careful track of "units of measurement" to get the relations. I know I need to divide by .1 kg/litre instead of multiply because I need to cancel "kg" and get "litre" in the numerator, not the denominator.

And don't forget the constraints that are often not mentioned: , , and .