Its kinda tight, i was able to press the lock then pull, try changing the top sensor 1st, that might fix the problem, the upper sensor is the one sending signal to control the air fuel mixture, change the upper sensor 1st if your having disconnecting the buttom part. The space is so tight. Just locate the lock and press then just pull the cable.
Check your MAP sensor first try cleaning it or just replace it, then replace the O2 sensor the up stream first because the downstream the wire harness is very difficult to detach. So i would change the upstream 1st, that might might fix the problem. And check for vacuum leaks.