calculate the quantity of heat (J) which flows froma 125g sample of magnesium as it cools from 650K to 300K

q = mass Mg x specific heat Mg x delta T. You must look up specific heat Mg. Be sure it is in J/g or that you can convert it to J/g if you use mass in grams.