Hi Stuart
The lambda sensor measures oxygen in the exhaust gases and the ECU processes this info and continually adjusts the fuelling to ensure optimum air / fuel ratio.
The NOX sensor measures the oxides of nitrogen in the exhaust gas to determine when the EGR valve should be activated. In simplistic terms, NOX is produced when combustion temperatures are high and the EGR valve bleeds exhaust gas into the cylinders to reduce combustion efficiency which in turn lowers combustion chamber temperatures.
Cheers Spike