The Formation of the Milky Way and its Neighbors