The stories are related in Pesahim 108a and later commentaries by Rashi and Rashbam.