Hi,
The P0171 indicates a lean fuel mixture and code P496 is related to the canister purge valve which is part of the emissions system.
A lean mixture is usually the result of an engine vacuum leak. The two are likely tied together.
First, I attached a pic below. Open the hood and locate the component I highlighted. Check the vacuum hoses on both sides of that for damage, dry rot, being disconnected, or anything you feel could cause a leak. The component is the canister purge valve.
Here is a link you may find helpful:
https://www.2carpros.com/articles/how-to-use-an-engine-vacuum-gauge
Let me know what you find or if you have other questions.
Take care,
Joe
See pic below.
Image (Click to make bigger)
Monday, September 6th, 2021 AT 7:43 PM