Train will be much easier. No advantage in driving unless you want to stop enroute somewhere off the rail network. trenitalia.com has timetables and fares.
A train will take you from city centre to city centre, which you cannot do with a car. I did this trip last year. I caught a regionale train from Venice to Trieste so the train fare was cheap, and I stayed at a hotel across the road from Trieste train station. This is only about a 10 minute walk from the city centre. I have checked my diary and the train fare was just 13.50 Euros. Hiring a car would be both more expensive and more hassle because of the need to look for parking.