THE BEAR STEARNS COMPANIES INC. Medium Term Notes, Series B with Minimum Maturity of Nine Months from Date of Issue AMENDED AND RESTATED DISTRIBUTION AGREEMENT