How do you know if blood is from vagina or urinary track?

Insert a tampon. If the blood is vaginal, it will stain the tampon. If it is urinary, the tampon will remain unstained.