The easiest way to reach the Cotswolds from London is by train from London Paddington to Moreton-in-Marsh, where there is an Avis car rental center in front of the White Hart Hotel. You may want to do this, then drive to Stow-on-the-Wold, check into your hotel, and do day trips to Bath and Stonehenge while you are in the Cotswolds, not necessarily on the first or second day. Drive time from Moreton to Stow is 15 minutes.
So, you could do your trip in the reverse order of what you originally planned.
It is 61 miles from Moreton-in-Marsh to Bath, if you should choose to do Bath the first day, and then back to Stow.
You could, starting early one morning, drive from Stow to Bath, then to Stonehenge, then back to Stow.
I agree with Pam. If you decide to go with your original plan, Bath is a lovely place to spend the night. And a lovely place to take walks around town.
One more option. You can take the train from London to Salisbury. (Quicker than driving.) Catch the "Stonehenge Bus" from the town center out to the stones (short ride-10 to 15 minutes). See the stones. Ride "Stonehenge Bus" back to Salisbury. Take a look at Salisbury Cathedral before you leave town.
Catch a train to Bath. Spend the night in Bath, as recommended by Pam. See the sights. Rent car in Bath. Drive to Cotswolds.