I will have a rental car... Is its possible to do the three towns in a day?
If you are on a scavenger hunt, yes. If you want to enjoy yourself, no.
Are you waking up in Segovia and sleeping in Avila? If yes, will you have already exhausted Segovia and will tour Avila the next day?
From Madrid
I am all for doing as much as possible in limited time, but when I do try to see something, I try to do it well. Trying to cram in three famous sites in one day is not really a meaningful visitation experience.
First, the rental car may not make the trip necessarily more efficient as you do not know your way around and you will need to find all the correct roads and parking.
You will also need to devote a very very, full day to travel and touring, and you will basically be flying through each site. You will have to check opening and closing hours.
The minimum for Segovia is half a day--visit the Alcázar, stroll the town, see the aqueduct.
El Escorial could also involve up to half a day for a visit as you walk through the monastery and explore.
Finally, lovely Avila--the city deserves a minimum of a day just for itself! There are many famous historic sites to see, such as the church dedicated to Santa Teresa, and you can also walk both around and on the city walls.
i definitely would NOT do all three in a day--I might not even choose to do two in a day. If you can include an overnight and dedicate two days that would make the three visits more feasible.
But, it is your schedule and your trip, so only you can make the final decision. Buen viaje!
I did a good day tour of Avila and Segovia from Madrid that was a long day and great, but I wouldn't try to do more in one day.
Time of year will make a difference, but In my experience visiting more than two places in a day is difficult. As PhilaLady mentioned, look up the different sites’ hours of operation. Trying to coordinate your visits is never easy since many close for a few hours in the afternoon. Invariably, you’ll get to someplace during those closed hours. Fortunately for you the only main attractions you’d be concerned with would be the Alcázar in Segovia and monastery in El Escorial. The other main sites are always open.
In your case there is a minimum of 4-4.5 hours of driving if starting and ending at Madrid’s airport. You can add time to that if it’s rush hour in Madrid. Then you need to find parking in the places you intend on visiting. Looking up parking locations and bookmarking them to whichever navigation program you use can save time. Once away from Madrid the drive between places is pretty straightforward.
How much time you spend at each place will depend on what you intend to see. Ávila could take 2-3 hours if you wanted to walk the walls (there is a fee for walking them) and go over to Cuatro Postes overlook. San Lorenzo de El Escorial can also take a few hours. Unless things have changed, there’s little else to see in the town other than the monastery. Segovia is a minimum half day as has already been stated.
Where are you sleeping that night?