Bath is close enough to the Cotswolds for day tours, but your best bet without a car is to take a minibus tour through the Cotswolds. Trains do not run throughout all the Cotswolds from Bath. Bath is also not close enough to Oxford to do a very good day trip. It can be done, but you won't have much time there.
Bus service between towns in the Cotswolds can be a once a day from one town to the next, or every other day from one town to the next. Some towns have bus service a couple of times a day, maybe 2 buses thru per day. So it could take you a good while to see a half dozen towns. It could be done by bus, but not very easily.
The way I would do your trip:
1. Train to Bath. Stay a couple of nights in Bath. On the last day you are there, do this tour first thing in the morning. You want tour Number 2, which takes you to the Cotswolds:
http://www.madmaxtours.co.uk/flip-box-tour-2
Mad Max Tours use small mini-buses and have a great reputation. This will save you a lot of driving hassle.
http://www.madmaxtours.co.uk/
Then...(2)--Train from Bath to Oxford. Check into a hotel or B&B in Oxford. Stay a couple of days. There is a lot to see in Oxford, and many beautiful streets to see on a city walk. There is a very good museum in Oxford, the Ashmolean, which you may want to spend most of a day browsing.
You would see not very much if you tried to do this as a day trip from Bath. You would have the train trip that morning, and train trip back to Bath that afternoon, so you would just have a couple of hours. Most of the day would be spent on the train.
Then...(3)--Take the train from Oxford to one more close-by destination. Directly on the train line from Oxford is the Cotswolds town of Moreton-In-Marsh. You could train to there and stay two or three nights. At the end of your stay, you can easily train back to London from Moreton-In-Marsh.
OR you could train to Stratford-Upon-Avon, a short train ride from Oxford (25 minutes). This is one of my favorite places in England. It is a town that becomes more terrific the more you walk around in it. See Shakespeare's house. Walk down to Trinity Church, where Shakespeare is buried, and it is just the way it was in the 1500's. The River Avon is beautiful, with swans, ducks, and canalboats in the basin near the Royal Shakespeare Theatre.
Stratford-Upon-Avon has great little coffee shops, cafes with great food, and cute shops.
Easy train ride to London when your time is up.