For Versailles, the thing is to plan your visit and to minimize crowds. It's a big place. Are you interested in seeing the gardens, or just the palace?
One strategy is to arrive early and wait near the front of the line for the palace. Then visit the gardens or get some lunch in town and go home.
Strategy number two is to visit the gardens first. There's a city bus form the train that will drop you near the walk-up for the Petite Trianon at the other side of the grounds. Then you can make your way back to the palace and visit it in the less-busy afternoon.
For Chartres, Mr. Malcolm Miller leads scholarly tours (more like guided lectures) of the different aspects of the cathedral regularly. It is worth coordinating your visit to meet up with him. Typically there is one at noon, which implies a fairly early start to get to Montparnasse to catch the train.
The cathedral and old town (which is also charming) are perhaps a half mile or so from the station in Chartres