I have been to Spain once and took a couple of trains (we rented a car for part of the time) but was not super attentive to how much they run on time. If you want to travel to Cordoba and then to Toledo you have to go back to Madrid to do it. It is the same train station fortunately. Do the trains from Cordova run on time? I am trying to figure out how much time to allow.
And how about the trains from Toledo to Madrid? I am looking at taking a train to Salamanca which leaves from a different train station than the train arriving from Toledo. I found a train leaving Toledo at 6:25 pm and arriving in Madrid Atocha at 6:58 pm and a second train leaving at 7:30 pm from Chamartin. Assuming that tickets to Salamanca are in hand and the station has been scoped out ahead of town, is that doable?