P0138 & P0606 error codes

By the way, are the upstream and downstream O2 sensors interchangeable on a 2005 Toyota Corolla S?

I have a spare downstream O2 sensor. I was wondering if I could use it to replace the upsteam sensor.