If I'm reading this correctly, it sounds like he attached a used pin to his barrel, then realized what he had done and swapped it back to his own, new pin.
The real question is, WHY THE HELL would you then inject with this barrel?! Seriously, WTF?!
I am going to speculate here - and this isn't to scare you - but yes, I believe a virus could potentially be transmitted this way, especially if the person aspirated and drew some blood through the needle.
Dude, I really cannot even fathom why you would still use this barrel after attaching a dirty needle used by someone else - regardless of whether or not you replaced it with your own.
And where the hell are you training? People leave old pins lying around on the ground? Man...