This question is really about arithmetic, not probability. Since Ram travels Delhi to Bharatpur to Jodhpur to Jaipur to Ajmer in a straight sequence, the total trip time is simply the time of leg 1 plus leg 2 plus leg 3 plus leg 4, whatever modes are chosen.
First, list the travel time for every available mode on every leg:
The lowest total comes from picking the lowest number in each leg: $12 + 12 + 2 + 4 = 30$ hours. That is the best (fastest) itinerary.
Now look for the second lowest total possible. Because the legs are independent, the next best total is just 30 plus the smallest "step up" available on any single leg, since only one leg needs to change to move to the next best combination:
The smallest available step up is 1 hour, on leg 4. So the second best itinerary total is $30 + 1 = 31$ hours, reached by keeping leg 2 on train and leg 3 on flight, and switching leg 4 from train to bus or taxi.
Let's summarize:
So the second best option gives a total travel time of 31 hours.