A lot of people believe you must give way to the right when merging.
But that's not the rule. There are actually 2 different merging rules to remember, depending on the situation.
Let's look at merging situation number one, when one marked lane comes to an end. If it's your lane that's ending, it's just like any other lane change, you must give way to any traffic already in the lane you're moving into. So here, vehicle A needs to give way to vehicle B. When the lane is clear, vehicle A is free to move across.
The other merging situation arises when there are no marked lanes, but different lines of traffic merging together into one. In this situation, you must give way to any vehicle that's in front of you. So vehicle B needs to give way to vehicle A.
Doing it the right way is easy when you know how.