Car A.
It does not matter if car B has started their manoeuvre, they were joining. It only matters after car B joined. Was car B over the give way lines? The whole car not just half of it.
This is the same for double yellow lines and also red light white line. If your car is over double yellows, even by a bit you can get a ticket. If your car is not fully passed over the white line when the lights go red, you can also get a ticket. Yes, very rarely enforced, but still.
Unless car B had completed their manoeuvre fully, they did not have right of way. It's the same if you start pulling out of a give way and a car speeds past and takes your front bumper off. It would be your fault and you would be paying out. Because you were pulling out. This is why, flash for cash became a thing.
However, that all said, please don't get too hooked on who was right or wrong if no crash happened. Too many people get into a crash because they get too stubborn over right of way. The amount of near misses because people want to shout, beep and feel superior on the roads is stupid. Everyone makes mistakes. If you see someone about to pull out on you, take action as you do now and have a little moan after.
It's depressing how many people upload YouTube videos of driver mistakes, just to say, look, look, I had right of way! They fucked up, beep, beep, beep! They beep before braking. It's sad.