The question is worded poorly, but it looks like you have a lever in equilibrium, with a force x at a distance d from the fulcrum, and a force y at a distance L - d from the fulcrum. You already have the equilibrium formula for this situation:
xd = y(L - d)
If you know x, y, and d, you can solve for the length L.
We can wrap 12 presents. multiply the number of yards by the feet.
So we know that there are 8 slices per large pizza (7), so a total of 56 slices
we would set up a proportion
5/8=x/56
8 times 7 gives you 56, and we would do that same thing to the 5 (multiply it by 7) to get 35?
so now we know that 35 out of 56 slices were eaten
56-35 is 21
so there are 21 slices left over
I think it has 3 or 4 sides not sure