Nothing crawled under the ring at the bottom of the condom then travelled up to the tip. If the ring was that loose, the condom would have fallen off before anything got that far up it.
All you need to know is you can't get hiv when you use a condom, so relax and move on.
hiv is dead in air so it is no risk if something gets in the condom after the penetration ended- perhaps you got mixed up about when the discoloration got inside the condom. Etc.