When clearing out of the BVI just the skipper
needs to bring the ship paperwork (which includes the clearing-in papers if the boat is not based in the BVI) and passports to the office. This is at the west end of the ferry terminal in Soper's hole. There you will get a form to fill out where you enter the boat information and crew information. They will then do a bit of magic with stamping things, then ask you to pay the fees
(which is one door away) and they take you nominal fee and stamp some more of your paperwork which you then bring back to the original office where, after some stamping, you get your processed clearing out form. That is it, you now have up to 24 hours to depart BVI waters. I usually remove the BVI courtesy flag and fly my "Q" flag at this time, but it is sufficient to put up the yellow flag upon entering US waters.
Clearing in at St. John you can anchor
in the area specifically for clearing-in/out (but my boat has too much draft
, so I have to anchor
waaay out) then all people on board must present themselves personally to customs/immigration with their passports. Note that the visa-waiver program does not apply to entry via boats, so if you have any non-American, non-permanent-residents aboard they will need a visa to enter the U.S. via the boat (they could take the ferry and meet up with you once you've cleared in). You will fill in a U.S. form (which is geared towards commercial
vessels, so has some hard-to-answer questions on it) and once that gets stamped you've cleared into the U.S.
The U.S. does not normally issue clearing-out paperwork and the BVI will accept your return without having cleared out of the US. If you go from the USVI to another country you have to return to immigration and fill out the entry form again - then they put an "Exit" stamp on that form which you can then use to clear into another country.
The procedure is usually relatively quick and painless, the BVI takes longer than the U.S. does. I've cleared out of the BVI in 10 minutes and it has taken over an hour another time. The US is always fast, efficient and invariably friendly.