CHICAGO -- Pinch-hitter Geovany Soto 's three-run homer capped a four-run rally with two outs in the 13th inning and sent the Chicago Cubs to a wild 5-2 victory over the San Francisco Giants on Thursday.