This entire expression gives the total number of apples required to make 2 pies and 4 cakes.
x is the number of apples for a cake. 3x would be the number of apples it takes to make a pie. 2(3x) would be the apples for 2 pies and 4(x) would be the number of apples for 4 cakes.
Each item could be included in a set or not included. That gives 2^5 = 32 ways to choose sets, including 1 set with no items, 5 sets of 1 item, 10 sets of 2 items, 10 sets of 3 items, 5 sets of 4 items, and 1 set of 5 items.