Analysis from Quran:
source.
2:158 Indeed, the safa1 and the marwah2 are from the markers/tokens (sha3air)3 of God, so whoever did HaJJ 4 (at/of) the shelter/house5 or enlivened/visited6 there is no blame/error on him that he go amongst by/at them both7 and whoever volunteered good/better8 then God is Appreciative, Knowing.
1 - root: Sad-Fa-Waw. See Project Root List to read about possible meanings for given roots in this article.
2 - root: Miim-Ra-Waw.
3 - root: Shiin-Ayn-Ra. The root meanings and Quran usage suggest the word describes things/tokens/symbols/markers/practices (usually to do with sustenance/benefit) that have a deeper significance, i.e. help make us aware of something (e.g. God and His beneficience). Honouring such "sha3air" can indicate "taqwa" (forethoughtfulness/conscientiousness/piety) of the hearts, and can provide opportunity to be thankful and/or magnify God for what He has guided you - see 5:2, 22:32, 22:36-37.
4 - root: Ha-Jim-Jim. Note the perfect/past tense implies one could have done "HaJJ" but not necessarily encountered "safa" and "marwah" yet, meaning they are not compulsory aspects of "HaJJ" (or "umrah") but are accessible secondary to it. Also if they were an intrinsic part of "al HaJJ" then there would be no need to state "there is no blame on him that he should go about/amongst them". This is further reinforced by the imperfect tense "ttawwaf" which follows. As a side note, some Traditional commentators also mention this point.
5 - root: Ba-Ya-Ta. It principally means to reach the night or spend the night in and "bayt" is that place. It can be used for any structure that is utilised for such a purpose. Thus, "bayt" is closer to shelter as the conceptual meaning and within that meaning is the house. In this context it refers to the locality/region/area, wherein "al hajj" is being held, and is thus acting as a shelter/house for the people. This will be further discussed later.
6 - root: Ayn-Miim-Ra. Also perfect/past tense.
7 - root: Tay-Waw-Fa. Note it says "ttawwaf bi" which is the exact same phrase in 22:29 (involving the ancient/noble shelter/house / "al bayt al 3tiq") which most commentators take to mean "circuit" but they do not take it to mean "circuit" here. Some may argue that since there are two objects here, going to and fro is the implied meaning here rather than "circuit".
8 - the phrase "whoever volunteered good/better" is likely related to what came before, i.e. "no blame on him that he go about them". Interestingly, if it is taken as "whoever volunteered better", as I feel the implication is, then this can only mean: better than "going about/amongst safa and marwah". The obvious question then is: what is better?
2:158 clearly indicates there is a difference between HaJJ and i'tamara/visited (commonly translated as "umrah").
The additional information we have extracted about "safa" and "marwah" is as follows, which may help narrow down the possible meanings:
1) other occurrences of "sha3air of God" refer to provision of sustenance/food by means of the animals, thus they could be related to that
2) they are accessible to those who did HaJJ or visited the house/shelter, but are secondary to it
3) it is possible some might mistakenly assign blame if one goes about them or one going about them could think they are doing something negative/wrong
4) it may be possible to volunteer better than going amongst them
When we look at CAD "al safa" can refer to the animals which give much milk (said of she-camel/sheep/goat), and "al marwah" can refer to a stone where a cooking fire is started or on which an animal is slaughtered. If we opt for these meanings then the one going about them in 2:158 would be consuming food, not providing it. If so, this makes it easy to understand why this could be thought of as a negative, i.e. someone at this location could take advantage of such offerings/availability and consume aplenty without giving in return. This would also help explain why it says "whoever volunteered better" because providing food is better than consuming it, and this may tie in with verses such as 2:196 which discusses giving an offering/gift (e.g. an animal to be used for food provision). This is also the case for one who did HaJJ because even though doing HaJJ involves providing food for others, one could still consume more than they gave.
If we do choose this meaning, then we may need to consider why animals of milking are not discussed under the ordinary food to give/feed others with for one undertaking the HaJJ and this may be because it is more difficult for one to do, as the timing needs to be right for a female animal to give milk, e.g. shortly after them giving birth. Giving an animal for slaughter is much easier.
There are other possibilities for these words from CAD, e.g. "al safa" can mean "the palm tree heavy with fruit", "al marwah" can mean "a type of fragrant tree".
A plausible interpretation of "no blame on him that he go about them" is that this phrase is often used in AQ to discuss an exception/modification to the recommendation/rule/principle (e.g. 2:229, 2:282, 4:101, 4:102, 24:29, 24:58, 24:60), thus could refer to an exception, e.g. regarding slaughtering of animals on a stone (as this may be misconstrued as a throwback to idolatrous practice, see 5:3), or "marwah" can mean a stone from which blades are made even though there is no hunting or fighting in this period, or sightseeing of unique/stone landmarks at such a location could be mistaken for their veneration. Volunteering good/better in this case would be to help out at the event rather than sightseeing perhaps.
There seems to be insufficient evidence, as per Quran, to definitively deduce the meaning of "safa" and "marwah", however we should bear in mind that whatever they are the implication is that they are not critical/compulsory aspects for one who did "HaJJ" or visited.