Just drive over the bridge north-bound out of San Francisco. The toll is only collected south-bound into San Francisco. If you don't want to pay any tolls to get back to San Francisco, then circle the bay clockwise. Detour over the Benicia-Martinez Bridge as that is the bridge that is toll-free south-bound.