  Surveys of the Milky Way (MW) and M31 enable detailed studies of stellar
populations across ages and metallicities, with the goal of reconstructing
formation histories across cosmic time. These surveys motivate key questions
for galactic archaeology in a cosmological context: when did the main
progenitor of a MW/M31-mass galaxy form, and what were the galactic building
blocks that formed it? We investigate the formation times and progenitor
galaxies of MW/M31-mass galaxies using the FIRE-2 cosmological simulations,
including 6 isolated MW/M31-mass galaxies and 6 galaxies in Local Group
(LG)-like pairs at z = 0. We examine main progenitor "formation" based on two
metrics: (1) transition from primarily ex-situ to in-situ stellar mass growth
and (2) mass dominance compared to other progenitors. We find that the main
progenitor of a MW/M31-mass galaxy emerged typically at z ~ 3-4 (11.6-12.2 Gyr
ago), while stars in the bulge region (inner 2 kpc) at z = 0 formed primarily
in a single main progenitor at z < 5 (< 12.6 Gyr ago). Compared with isolated
hosts, the main progenitors of LG-like paired hosts emerged significantly
earlier (\Delta z ~ 2, \Delta t ~ 1.6 Gyr), with ~ 4x higher stellar mass at
all z > 4 (> 12.2 Gyr ago). This highlights the importance of environment in
MW/M31-mass galaxy formation, especially at early times. Overall, about 100
galaxies with M_star > 10^5 M_sun formed a typical MW/M31-mass system. Thus,
surviving satellites represent a highly incomplete census (by ~ 5x) of the
progenitor population.
