Hi JaimeT
I had a similar trip in Nov 2021, except that I stayed in each city, including Madrid, and my total trip was 13 nights. I'll describe what I did and you can check to see that public transit still makes it possible. I only had to go back into Madrid for the Segovia to Toledo transfer.
Mon Nov 1: arrived Madrid in AM, train from Madrid Principe Pio station to Avila (90 min). Slept Avila 3 nights.
Thu Nov 4: Avanza bus from Avila to Salamanca (90 min). Slept Salamanca 2 nights.
Sat Nov 6: train from Salamanca to Segovia Guiomar station (75 min). Slept Segovia 2 nights.
Mon Nov 8: train from Segovia Guiomar to Madrid Atocha, then train from Madrid Atocha to Toledo (about 2 hours total time). Slept Toledo 3 nights.
Thu Nov 11: train from Toledo to Madrid Atocha. Slept Madrid 3 nights.
Sun Nov 14: departed for USA.