The equation dUm = Cv,mdT holds for constant volume and constant moles. The subscripts V and m indicate for which terms the amounts are held constant for.
From the full formal equation the (dU/dV)TdV term cancels out to zero when the volume is constant (dV= 0), so that the equation simplifies to:
dU = (dU/dT)VdT
From this you can see that:
Cv = (dU/dT)V
Or in other words, the heat capacity "C" is just a slope, a rate of change of energy with respect to temperature. The higher the heat capacity C, the more energy that is absorbed for a given increase in temperature.
The reason why you have to use separate heat capacities with constant V (for internal energy) or constant P (for enthalpy) is to cancel out one of the two terms in the formal equation (as done above for the full equation where dV=0 allowed a simplification to just one term). This allows you to solve the problem. You can use Cv to get the change in internal energy (so use Cv for part A) at constant volume, and you can use Cp to get the change in enthalpy (so use Cp for part B) at constant pressure.