The easiest way from Munich to Salzburg is by train. I would think
it's about 2 hours each way.
Actually, the slowest train connection from Munich Hbf is 1h46m by regional train, and with the regional train you can use a Bayern-Ticket which would cost 31€ for a round trip (which the OP wants to do), far less than renting a car for the day. For a little more cost, the trip by RailJet takes only 1h28m. According to ViaMichelin, the trip by car on a good day would take 1h46m, same as the slowest train. So, for what the OP wants to do, a day trip, the train is the best way, hands down.
Although I wouldn't recommend trying to go to Berchtesgaden on a day trip to Salzburg, there are a multitude of inexpensive ways to get to Berchtesgaden from Salzburg. Ask me.