engine light on code P442 and P140 on 2006 Chevrolet Impala SS

I did replace the gas cap with a new one from auto parts store.

Asked by for the 2006 Chevrolet Impala SS
bank 1 sensor 2 has issues with reading exh gases. after market gas cap are not always reliable. po442 could be cap issues or evap leaks in other areas.
Greg is right, also the last fuel cap i got was from a GM dealer for less than aftermarket, with retainer strap!