The last few drops after peeing remain on my penis which wets my underwear or my pant if there is no underwear(which makes situation even worse).Also I would be happy if someone tells me how to pee in urinal properly to avoid any nasty affair.
Underwear is one way to isolate your expensive outerwear from your body's various daily glandular functions and their waste such as skin cells, hair, sweat, oils, etc. Urine is just one of them that you've recently noticed.
Some males wipe or "blot" (soak-up) the moisture with a small piece of toilet tissue that they discard when they flush or put into waste before washing their hands. Some hold the base of their penis and quickly "flick" the remaining droplet(s) from it into the urinal. Some squeeze the excess by working from the base of their penis to the end forcing the remaining moisture from it. Some press the base of their penis behind the testicles to accomplish the same thing.
Try different things and go with what works for you.