Answer
a. Find the heat transferred to the water.
$$Q = cm \Delta T$$
$$=\frac{1 cal}{g \cdot ^{\circ}C}(50 g)(50^{\circ}C - 22^{\circ}C ) = 1400 cal$$
At 40% efficiency, only 0.40 of the energy in the peanut raises the water temperature.
1400 cal = 0.40 of the total energy in the peanut.
Solve for the peanut's energy: $\frac{1400 cal}{0.40}$ = 3500 cal.
b. $\frac{3500 cal}{0.6 g} = \frac{5833 cal}{g} = \frac{5.8 kcal}{g} = \frac{5.8 Calories}{g}$.