The first thing you need to rule out is a UTI (urniary tract infection) This is extremely common, and sudden changes in bathroom behavior can be caused by it. So, make an appt. with the vet to get checked for a UTI.

As far as the barking at cars goes, you can tackle it several ways. One is to carry treats with you on your walk. When you see a car coming, distract your dog with treats. This will over time cause the dog to always turn to you for treats when a car speeds by instead of wanting to chase it. Others will have advice, I'm sure.