The episode is "The Friendship" (Season 2, Episode 3; aired October 22, 1952).
Ricky and Fred meet Ethel on a cruise ship; she's traveling with Lucy. The couples bond, leading to the Mertzes moving into the Ricardos' apartment building—establishing the core quartet's dynamic.