Just think it through slowly, carefully and logically. Suppose you have z mg of analyte per g of chocolate. After each step, work out the concentration in terms of z. (A step is whenever you do *anything* to your sample.) Eventually, you should get an expression for y in terms of z. From this, and your measured value of y, you can calculate z.

To start off: you take 0.500 g of chocolate. This contains 0.5 g x z mg/g = z/2 mg analyte.

This is dissolved in 20.00 mL water. What is the concentration of z?

What is the concentration after adding the internal standard? (You must take account of both the amount of internal standard and the change in volume.)

Etc.