P0440 is an evap system leak. Could be purge valve, charcoal canister vent, or even a loose fuel cap. The P0502 is probably a bad vehicle speed sensor on the trans. Does the speedometer work?