To get to Berlin you have to take a train three hours. The train is not air conditioned. However, if you want to see Berlin, this is pretty much the only way to do it from a cruise.
You need to buy a tour from the cruise or an independent operator. Berlin on your own in six hours is tough. See the wall, Brandenburg Gate, Holocaust Memorial, Checkpoint Charlie. Understand most everything has been built since 1945 as the city was devasted by WWII.
Skip the Carlsberg Brewery. Not worth the time in a tight schedule.
Go to the Resistance Museum, but it is not a fun outing. The tour takes one hour. The guide is excellent.
You can walk from the Viking Museum to the other museums, but there is a bus, free with the Oslo card.
After you have had your fill of museums (Fram is the best), take two buses (it's really easy, and when you get your Oslo Card you get the bus map) to Vigeland Park. 101 sculpture's, including the Obelisk and Angry Boy.
From Vigeland, take a tram (still free) to Central Station. Cross the street and walk down the main shopping street, Karl Johan's Gate if I recall correctly, past shops, restaurants, a church or two, parliament, ending in the Royal Palace. Watch the guards, then turn back to the harbor and see the Nobel Peace Museum and the City Hall. Then back to the ship; you can wander the outside of Akershus Fortress. The tour of the fortress (also free with the card) is only available within a narrow window. The Resistance Museum is on the grounds with longer hours.
Peterhof is outstanding; the fountains are on a schedule, so only go when the fountains will be on. Make sure you see the trick fountains.
Catherine's Palace demonstrates the disconnect between the nobility and the peasants. Ostentatious does not begin to describe it.
Don't miss the Church on the Spilled Blood, especially the memrial on the spot of Cazr Alexander's assasination. Don't miss St. Isaac's Cathedral, which is a huge Russian Orthodox Church. Don;t mkiss Peter and Paul fortress, especially where the Czars are buried.