The element that was oxidized is carbon, as it’s oxidation state increased (electrons were lost) from +2 (in the reactants) to +4 (in the products). The element that was reduced is nitrogen, as it gained electrons and went from a +2 oxidation state (reactants) to a 0 oxidation state (products). Since the carbon was oxidized and it’s electrons were used to reduce the nitrogen, carbon is the reducing agent.