I will give you some suggesitons but need to understand what you are doing. Starting in Bath and ending in London? How many days do you have for this vacation? By going to cities only, you do not need to drive and the trains are excellent.
I would fly into London, train into Bath from London as soon as you land. Then spend your time in Bath before taking the train back to London. Spend time in London, then take the train to York and spend time there. From York you can take a train to Edinburgh. From Edinburg I am sure you could take a train places, depending how many days you have. But not knowing how many days you have, this is how I would do it if you have enough days to spend in each city to see it and do it some justice.
There is so much to see in London and Edinburgh you could easily spend a week in each city. Bath at least three days and York at least two to three days.
Just a side note, there are lots of great day trips you can take from London using the train or taking a few tours. Kew Gardens, Greenwich, Windsor Castle, Hampton Court that all day a day or most of the day. Along with what there is to see in London, you will have plenty to see and do. And there are a few days trips you can do from Edinburgh too. So you have lots of options, just depends on what your interested in and how much time you have.
I would suggest if you have not already, read the RS guide books, look at the free YouTube videos that RS has and others on the cities you plan to visit, and look at the scrapbooks on this forum which has valuable information on what there is to see an do.
Have fun planning it. Safe travels!