Firstly be aware that cars are useless and generally an inconvenience in cities. Also you have very high drop off fees if you hire in one country and drop off in another. I’d travel between the 3 cities by train. To balance the 9 days in cities I’d rent a car in Vienna and drive to the beautiful Salzkammergut area for the extra 5 days. Whilst there you can explore the wonderful scenery and visit nearby Salzburg. Return the car to Vienna and continue to Budapest by train.
here some recommendations for day trips around Vienna:Wachau valley – a really beautiful region along the Danube, west of Vienna. The villages of Melk and Dürnstein, as well as the town of Krems are well worth a visit. The region is also famous for its wines and apricots. Find more information on the region on https://www.donau.com/en/wachau
If you want to get into the mountains from Vienna, I recommend a visit to the Viennese Alps: https://www.wieneralpen.at/en
Another charming place is the region of Mariazell: http://www.mariazell-info.at/
I coincide with the assessment of a car's usability in cities (in general) as well as while being a few days in a city (car parked anywhere but still incurs expenses), but at the end you must decide.