I attempted this problem however I highly suspect that my answer is incorrect, any help on how to approach it efficiently will be appreciated. It proceeds as follows:
I bought a box of chocolates for myself last week. However, by the time I got home I had eaten $\frac{7}{8}$ of the chocolates. As I was putting the groceries away, I ate $\frac{2}{3}$ of what was left. There are now 22 chocolates left in the box. How many chocolates were in the box in the beginning?
My Attempt:
Let the original number of chocolates be $x$,
I ate $\frac{7}{8}x$, the number remaining = $\frac{1}{8}x$.
Then I ate $\frac{2}{3}(\frac{1}{8}x)=\frac{1}{12}x$, the number remaining = $\frac{11}{12}x$, it follows that $\frac{11}{12}x=22$, hence $x=24.$
Everything looks good up until you said you had $\frac{11}{12}x$ remaining. You are correct that as you were putting groceries away you ate $\frac{1}{12}x$, but you need to subtract that from the number of chocolates you had when you got home instead of the total number you started with, so it should be $\frac{1}{8}x - \frac{1}{12}x = \frac{1}{24}x$ instead of $x - \frac{1}{12}x = \frac{11}{12}x$. After that you set $$\frac{1}{24}x = 22$$and solve as you did. That will give you $x = 22\cdot 24 = 528.$ Another way to do it would be to say that when you got home you had $\frac{1}{8}$ of the original amount left, and then after eating more you had $\frac{1}{3}$ of the new amount left, which gives you $$\frac{1}{3}\left(\frac{1}{8} x\right) = 22,$$ which gets you to the same place.