In the first two you linked to, i think the other answer was indeed better. In this onethis one, you just say "try this" and give some code, while the other user explained it. In thisthis, you did explain, but apparently the OP found the other one better.
TheseThese twotwo i think you did write well; +1 from me.
Timing matters too - often it will just be the first answer that gets accepted.
But in the end, it's all up to the asker to decide which one helped them the most. And yes, it is possible that some people prefer to accept high-rep users' answers, due to perceived better knowledge.
Myself, if it's a choice between upvoting a high-rep user and a low-rep user, i'll give the lower user the +1 if the answers are of equal value.