Just FYI, want to note that, according to the Russian laws, if you are traveling on ferry, you can stay in St.Petersburg for three days without visa (because the St. Petersburg is a seaport mensioned in corresponding law). You still need visa to visit Moscow, but may be this can help for your stay in St. Petersburg.
First, I can really recommend to read through www.waytorussia.net. This seems a very good online resource that could answer all my questions when I planned my trip through Russia last spring.
Therefore, I can recommend the service a third-party company provides over this website. You have to pay 20 US dollars and they book a hotel for you, send you the invitations and then cancel the whole tour again. They are specialized just for this service. Maybe you can get it cheaper, but for me it was way worth the 20 bucks.
http://www.waytorussia.net/Travel/VisaSupport.html
You can enter which cities you want to visit and they will write that into the invitation letter. With that invitation letter you can go to the embassy and wait for a visa. Be sure that in the visa application form to write down the same cities as in the invitation letter. Once you get the VISA, there is no remark in your passport in which cities you will stay. So your free to travel wherever you want. Just be sure to adhere to the dates of entry and exit of the country,.
Credit:stackoverflow.com‘