both codes are stored in the transmission, you most likly have an internal issue. Is the transmission slipping or shifting erratic? Check to see if the fluid smells burnt as well. If it is burnt than you do have an internal problem. Sorry for the news.

It's a shift solenoid malfunction in the transmission probably 3-2 downshift. Someone will have to spend some time checking the decision tree for the P0785 code. How many miles on the transmission? I found this 1- refresh the tranny fluid 2- with the ignition switch on/engine off, move the tranny shifter from P to L fast 8 to 10 times. this will clean the contacts of the PNP switch.3- have the dealer/shop clear the codes and see what returns