These codes relate to the accelerator pedal position sensors.

Start with a check and clean the electrical connection on the accelerator pedal. Look for corrosion / green colour / powdery build up.
Use electrical contact cleaner, MAF cleaner can be used if you don't have the electrical contact spray.

From there perform output tests on the pedal using diagnostic cable / VCDS.
OBD-II Trouble Code: P0121 Throttle Position Sensor/Switch A Circuit Range/Performance Problem
OBD-II Trouble Code: P0221 Throttle Position Sensor/Switch B Circuit Range/Performance Problem