Simple, what you're basically doing is simplifying,

well, you have 3x and you have

12/3=4
and you can "cancel" out an x, making your answer,

.
Answer: 24
8 oz is half a pound because a pound is 16 oz, so if you count how many halves go into 12 lbs you get 24 bags
2.4=6x so isolated the variable, 2.4/6=0.4 so x=0.4