It is generally agreed that the earth's moon was formed when a Mars sized planet grazed the early earth. Is it possible that this planet was slightly bigger and that it not only formed the moon but the left over went on to end up as Mercury?
It is highly unlikely that Mercury could have come from the collision that led to our Moon.
The terrestrial planetds are believed to gave have formed separately from accretion of matter at different ranges of distance from the Sun.
Moreover, Mercury is so dense that astronomers are led to believe that most of its mass is the iron-nickel core. The collision that made our Moon would have displaced lighter rocky material into space instead, and our Moon is in fact overwhelmingly rock with only a small core.