Probably a couple of hours, depending on how long you spend at each site.
Fortunately, it's mostly downhill from the ruins to cusco. Taking the taxi to the farthest ruin and walking back shouldn't be too difficult - as long as the altitude doesn't impact you too much. The ruins are all very close to the road. I saw some pedestrians walking between the ruins (I assume tourists because they were blond, looked hot and tired). Just make sure you have enough water. Just remember that pedestrians have absolutely no right of way. You can tell the tourists from the natives by the way they react to cars coming at them. The tourists that are use to having the right of way saunter while the natives actively move out of the way (as in run or jump). I'm surprised we don't read more about tourist pedestrians being hit by cars.
Thanks thats really helpful
We did this, intending to walk, and after enjoying Tambomachay we were solicited by an (unofficial) guide at Puka Pukara. We really liked him so agreed to pay him for explanations of the other sites back to Saqsayhuaman. After Puka Pukara he suggested that we catch a colectivo to cut the major part of the (boring) distance between Puka Pukara and Qenqo. This would be easy and inexpensive for anyone to do--as you walk down the road, look for anyone waiting for a bus and ask "colectivo a Cusco?". The colectivos are little white vans, I think 1-2 soles for the ride to Qenqo.
From Qenqo the walk is pleasant on to Saqsayhuaman. I also recommend walking down to Cusco from there--the neighborhoods are interesting to walk though down to the center of Cusco.
Thanks Kenito799, sounds like a great idea. However, how did you know when to get off for Qenqo - feels like that might be s bit tricky?