Hello, Yasmine,
The definition of specific heat provides most of what you need to know in how to solve this problem. Specific heat is defined as the amount of energy it takes to raise a unit mass of the substance by 1 degree C.
Looking at the data, we have the energy (Joules), the mass (in mg, but we'll handle that in a minute), and the temperature change, which is more than 1 degree C.
mDt
where c is specific heat, q is the energy involved (negative if heat is removed/released, and positive if energy is absorbed), m is the mass, and Dt is Delta T, the change in temperature (T1 - T2). T1 and T2 are the initial and final temperatures, respectively.
Although the problem does not say we in what units we should report the result, I'm nervous about the mass value in mg. Normally the quantity portion of the specific heat is given in grams, moles, or kg. So I will change mg into grams so that the resulting value of q will contain the more standard mass value of grams. There is nothing wrong if expressed in mg. They will be different in value by 1,000, but equivalent is use as long as the units clearly show mg instead of g.
The data are entered in the chart below. The first thing to note is that we are supplying heat to the substance. Since the substance is absorbing heat, the sign for the energy value should be negative. Note I converted mg to grams, which I use in the calculations. There are 3 sig figs from the original data, but that is not reflected in the calculations. Only in the final answer.

[Note that Dt is negative. T1 - T2 is negative because the temperature increase. Seems quite odd, and I still struggle with the apparent absurdity, but remember that we are reporting a negative energy (-25.9 J). So the negative values result in a positive solution.]
Specific heat for this substance is 4.19 J/gC, with 3 sig figs. That is essentially the same as water. Specific heat can be used to help identify a pure material in this manner.
I hope this helps. Remember to focus on the definitions and units. When you see the definition for specific heat, take the existing data and modify it as needed to calculate the answer. c = J/mC. Since we changed by more than 1 degree C, we have to use Dt (T1 - T2) so that the result is normalized to just 1 degree C. And always be careful about the amount of material. There are many different ways of documenting the amount (mg, grams, ml, cm3, etc.). Make sure the result is in the units desired by converting before (easiest) or after the calculations. If we has stuck with mg, the answer would have been 4190 J/mgC. Correct, but not often used in this format.
Bob
J.R. S.
10/06/20