I was driving down a 40mph road, but due to the time there was traffic and I was only averaging about 30mph. There was a junction to the left, and the person waiting believed I was giving way to them and began to enter the road. I was close enough to them that I had to brake quite harshly, and swerve my car to the right in order to avoid a collision. The thing I think I did wrong was that I never actually reached a complete stop, just very close, and in a split second decision I sped up again and drove by them. (They definitely had enough space to continue ahead of me if I did stop).
Once I was past them the road was widening into 3 lanes, and the car that emerged from the junction overtook me and so did another car that was behind me (this also makes me think I may have done something wrong).
I passed my test only 5 months ago and still view each day of driving as a school day, and worry about each mistake I make for hours to weeks afterwards due to OCD.
Any assessment of this situation would be greatly appreciated.