DoorDash Inc. is set to acquire Instacart for $17 billion, with legal guidance from Latham & Watkins, Cooley LLP, and Cravath, Swaine & Moore.