THE ANSWER:
Each twin took three bundles, and gave one sock from each bundle to his brother. No matter which three bundles each twin had originally, the swapping would ensure that Jed and Zed each ended up with one pair of white socks, one pair of brown socks, and one pair of black socks.