The P0405 code indicates a problem with the EGR valve. It may be bad or dirty. You can remove it and clean it with throttle body cleaner. Make sure the tube to the EGR is not blocked. As for the other two codes the it indicates a problem with the speed sensor in the transmission. They do go bad and you should probably have it replaced. This will cure some of your issues when driving.