Austria and Slovenia use a vignette system to collect tolls for their highways - it's a sticker you buy and affix to your windshield before entering the highway. The Austrian one will most likely already be provided if you rent a car there, you would have to buy the Slovenian one on your own, if renting in Slovenia, it will be the other way around. It can be purchased at all gas stations in the country and at major gas stations or gas stations along main international routes in neighbouring countries. Make sure you have it on your car before entering the highway as controls are common and fines severe.
Are you planning a one-way cross-border rental? These are either not allowed or very expensive, so try to avoid that if you can by renting in one country, using public transportation to cross the border and then rent another car or stick with the first car but go back to the country of rental to return the car.
Can't advise on the accommodation options in Trieste, but highlights there include the Piazza Unita, the main square on the waterfront, the old Habsburg city center, the Miramare Castle to the north of the city, along the coastal road. When I visit the city I like to walk along the seafront, watch the sunset and then go to one of the numerous bars in the center for an aperitivo - like a Spritz or Hugo, served with some hot and cold snacks. Otherwise, Trieste is also one of Italy's coffee capitals with plenty of cafes everywhere.