Why the hell is someone else cutting you up a bloody fail?! You stopped in time and didn't have an accident?! I know you might have reacted slower, but you always do when it happens the first time as slamming on brakes is way out of most peoples comfort zone.
You can't look out for everything! No matter how lessons you have. You can't learn how to avoide idiots cutting you up.
Just book it again and do it again. I was lucky when I did my test. I was 19 and had a 125cc bike for two years before, so that helped me loads. I did my test atrush hour with a notriously strict examiner. My Instructor actually said before I went out "You'll struggle to pass at this time with this guy". But I never let that phase me and I passed with 4 minors. You have to be alert, smooth, sharp and confident. I messed up a reverse park but pulled out and tried again without panicing. I did an controlled emergency stop even though I had never done one before too.
It's luck of the draw with this, but I can see why its necessary with some people to be so strict.
Good luck on your retry.