so we know that each m&m weighs about 2g.
the next line says to write a direct variation equation.
(definition: mathematical relationship between two variables that can be expressed by an equation in which one variable is equal to a constant times the other)
we then make the equation ( w=xm), then we use that equation to figure out the next line, which is to find the amount of m&ms that would fit in a bag of 1000.
(my head cant really process part a cause of a recent headache, so sorry if its wrong)
the answer to part b would be 500, which you can provide evidence based off of your part a equation.