For this problem, nitrogen can be taken to be a calorically perfect gas. When the temperature of the gas is increased under isobaric conditions, work has to be done on the gas which contributes to an increase in its internal energy and an increase in its volume.
The total work done is given by the relation W = n*Cp*dT where n is the number of moles of the gas, Cp is specific heat at a constant pressure and dT is the change in temperature. For diatomic gases Cp = (7/2)*R where R is the universal gas constant 8.314 J/(K*mol).
Heating the gas from 20 degree Celsius to 50 degree Celsius is equivalent to an increase in temperature of 30 degree Celsius or 30 Kelvin. This requires an addition of heat equal to
W = (7/2)*8.314*30 = 872.97 J
The heating of nitrogen from 20 degree Celsius to 50 degree Celsius under isobaric conditions requires an addition of heat equal to 872.97 J.