Method and device for reducing the nox and n2o of gases