Elements with differing siderophile affinities provide insights into various stages of planetary accretion. The isotopic anomalies they exhibit offer a deeper understanding of the materials responsible for the formation of terrestrial planets. By analyzing new iron isotopic anomaly data from Martian meteorites and drawing insights from published data for O, Ca, Ti, Cr, Fe, Ni, Sr, Zr, Mo, Ru, and Si, we scrutinize potential changes in the isotopic composition of the material accreted by Mars and Earth during their formation. Our methodology employs a Bayesian inference method, executed using a Markov Chain Monte Carlo (MCMC) algorithm.The Bayesian method helps us balance the task of emulating the compositions of the terrestrial planets (reflected in the likelihood) with the flexibility to explore the isotopic compositions of mixing components within permissible intervals (indicated by the priors of the nuisance parameters). A Principal Component Analysis of isotopic anomalies in meteorites identifies three main clusters (forming the three parts of the isotopic trichotomy): CI, CC=CM + CO + CV + CR, and NC = EH + EL + H + L + LL. We adopt CI, COCV, O, and E as endmember compositions in the mixtures. We are concerned here with explaining isotopic anomalies in Mars and Earth, not their chemical compositions. Previous studies have shown that Earth's chemical composition could not be well explained by solely considering undifferentiated meteorites, as it requires incorporation of a refractory component enriched in forsterite. The endmember chondrite components considered here are assumed to be representative of isotopic reservoirs that were present in the solar nebula, but the actual building blocks could have had different chemical compositions, and we use cursive letters to denote those putative building blocks (CI for CI, COCV for COCV, O for O, and E for E).Because Earth's mantle composition is an endmember for some isotopic systems, it cannot be reproduced exactly by considering known chondrite groups only and requires involvement of a component that is missing from meteorite collections but is likely close to enstatite meteorites. With this caveat in mind, our results suggest that Earth is primarily an isotopic mixture of ~92% E, 6% CI, and < 2% COCV and O. Mars, on the other hand, appears to be a mixture of ~65% E, 33% O, and < 2% CI and COCV. We establish that Earth's CI contribution substantially increased during the latter half of its accretion. Mars began accreting a mix of O and E but predominantly accreted E later.Mars' changing isotopic makeup during accretion can be explained if it underwent gas-driven type I migration from its origin near the O - E boundary to a location well within the E region during the first few million years of solar system history. Earth's later increased CI contribution may be attributed to the stochastic impact of an interloper carbonaceous embryo that moved inside the inner solar system region while nebular gas was still present, and subsequently participated in the stage of chaotic growth.The discovery that a significant portion of Earth's building blocks closely resembles enstatite chondrites contrasts with recent findings of Si isotopic anomalies in enstatite chondrites when compared to terrestrial rocks. We suggest that this discrepancy likely stems from insufficient correction for high-temperature equilibrium isotopic fractionation, whether of nebular or planetary origin. With appropriate adjustments for this influence, both the silicate Earth and enstatite chondrites exhibit comparable Si isotopic anomalies, reaffirming a genetic link between them.