Q: trouble codes on 2001 Ford Explorer

Rookie cbe0621eac06868b3efe0d8d1d3611e23c60d3114864ea2ec19a68cfbd3eebab
id like to know if a faulty gas cap would cause trouble codes po 171 and 174.when i bought this vehicle the check engine light came on shortly after.
i took it to the place of purchace and told them the first code which said loose cap or canister cover.they said it was probably a bad gas cap .know it shows these two new codes which says its burning lean in bank 1 and bank 2 thanks for any info
(3) Answers
(1) Comments
The link here does not work. I have this persistent 171 and 174 code. Have done the fuel pump, fuel pressure reg, new 02's, cats, new maf, fuel filter. Still throwing!
A faulty gas cap will not cause a P0171 or P0174 code. A faulty gas cap would cause an evaporative emissions code, possibly P0442 or P0446. Your 171 and 174 codes indicate a lean fuel mixture in the engine, possibly caused by a vacuum leak (intake gaskets or PCV system or broken vacuum hose), a weak fuel pump or restricted fuel filter or weak fuel pressure regulator, or a dirty/defective Mass Air Flow sensor. Also, double check the ductwork between the MAF sensor and the intake throttle body.