mariann97 Maybe some other passenger who visits Russia and Europe might do the same for you, I think it is worth asking.
most passengers on the busses are russians who have a Schengen citizenship. Typically russians are quite helpful. In fact one could ask at Tallinn coach station in the hour preceding departures.
That said card and mobile payment being widespread, people don't need to carry cash.
mariann97 via Estonia for example (that's what we did) you can change a small amount at the shopping mall near the airport
inside the hall of the Prisma that is nearby coach station, on the other side of the road to airport.
When walking out of the coach station, walk to the left, up on the small street to the renovated blocks with offices and couple shops, and you see the Prisma. The exchange counter just on the left. I was there 10 days ago. The Tavid sign:
Matthew what would be the best course of action
the simpliest and safest option is to buy rubles at the Tavid near coach station in Tallin.
Or take an earlier bus so to arrive at coach station in SPb early enough.
The coach station is by Obvodny canal, when you exit it, walk to your left and at the next crossroad near the bridge, over the crossing road, Ligovski prospekt, there's the metro of same name (Obvodny canal).
There are couple banks nearby, or you cross by the bridge and ahead on Ligovsky (toward downtown) there are one or two banks.
or like @mariann97 mentioned ask people on the bus, or before departure.