Interesting thing is how I kept subconsciously trying to identify where in St Petersburg each of these was taken — the architecture and overall appearance of Oslo at the time was so similar apparently.
That's a neat observation, the cities do have a similar history.
The medieval town called Oslo burned down in 1624, and a new city was founded on the other side of the bay. It was named Christiania after the monarch Christian. It kept that name until 1925 when they changed it back to the old historical name Oslo.
Some decades later, the Russian monarch Peter would also found a new city, which happened to have his name in it. So these two cities were being constructed at around the same time and taking design and architectural inspirations from the same places I would imagine.