my engine light came on i checked it with the OBD2 and the code is PO171andPO170 on 2003 Chevrolet Cavalier

I just put a engine from the junk yard and it runs good and its nice and quite but when sitting at a red light it feels like it wants to take off by its self what should i check first?

Asked by for the 2003 Chevrolet Cavalier
suspect a vac leak somewhere. if you have access to a smoke mach have them do that test and you will find the leak