171 is a lean code for long term trim. it most likely has a vacuum leak. if not it could be a mass air flow sensor, pcv valve or low fuel pressure.
the 300,301 is a missfire code. you need to check compression, spark plugs, wires, coil and injector.
it is not as easy as throwing parts at it. you need smoe help tracking it down for a pinpoint failure.