Food is composed out of three major constituents: proteins, carbohydrates and lipids (fat). When these are oxidised (burned) by our body they release energy, each of them giving a certain quantity of energy per each gram that is oxidised: proteins and carbohydrates release about 4 kcal/gram energy and lipids (fats) give about 9 kcal/gram. The same energy release rates happen when food is burned outside our bodies producing heat. In the experiment shown, the same amount of water is heated by burning the same mass of food from the four different samples. To heat a mass `m` (grams) of water between initial and final temperatures `T_i` and `T_f` (degree C) one needs the heat
`Q =m*c*(T_f-T_i)` , where `c =4.18 J/(g*@C)`
The sample for which water has the largest difference `T_f-T_i` will have the largest content of fat (since fat is releasing more than twice energy then other food constituents).
Therefore the correct answer is sample B) for which the difference in water temperature is the largest 95-17 = 78 degree C.