A chocolate bar is separated into several equal pieces. If one person eats 1/4 of the pieces, and a second person eats 1/2 of the remaining pieces, there are six pieces left over. Into how many pieces was the original bar divided?

Here is another way to do it.
Let x = number of pieces.
Then x-(1/4)x -(1/2)*(3/4)x = 6
x-(1/4)x-(3/8)x = 6
multiply through by 8 to clear the fractions.
8x-2x-3x=48
3x = 48
x = 16 pieces.
CHECK:
(1/4)*16 = 4 were eaten by person #1.
That leaves 16-4 = 12 pieces.
The second person ate 1/2 of that or (1/2)*12 = 6
So the first person ate 4, the second person ate 6 which makes a total of 10 and that leaves 6 pieces if there were 16 initially.