Internal energy, U, is equal to the work done or by the system, plus the heat of the system:
ΔU=q+w
in the question they tell you the work done by the system, and the internal energy:
8185 J= -346 J + q work is negative because it was done BY the system.
substitute in: q=m∗Cp∗ΔT and solve for Cp.
-------------------------------------
remember that ΔT=Tf−Ti
so the equation, really, is: q=m∗Cp∗(Tf−Ti)
------------------------------------------
185J=−346J+[m∗Cp∗(Tf−Ti)]
plug in the rest of your values and solve for Cp