Let me help you with this.
First, let's write the balance chemical reaction for the burning of Mg:
2 Mg + O2 --> 2 MgO
Second, convert the quantity of magnesium from grams to moles:
1.20 g Mg (1mole Mg/24.3 g ) = 0.0493 mol Mg
Third, we have the calorimetry:
q = m(Cp)ΔT, where ΔT is always final T minus initial T
The question gives the mass of water, the Cp of water is 4.184 J/g-C, and the initial T of the water is 5 C. But what about q? In the chemical equation, MgO is made from its elements, so we can use the enthalpy of formation from a thermodynamics table in a textbook. My text gives the ΔH as -601.8 kJ/mole MgO.
But that quantity has to be converted to joules and is per mole of MgO. So,
601.8 kJ/mole (1000 joules/kJ)(0.0493 mole) =29669 joules
Plug in for q:
29699 joules = (500 g)(4.184 J/g-C) (Tf - 5)
Take it from here and solve.
I hope this was helpful. Message me if you have any questions.