you dont have to wait. there are no interactions between the two. the coffee will make you less sedated and will add to your anxiety. may i ask why you drank coffee and why you need xanax? the two kind of contradict each other. for example, coffee causes anxiety and xanax treats anxiety.
i know people who enjoy both together, it is just a matter of preference and whether or not you want to be relaxed or be productive. if you need to do shit, then the coffee will help reduce sedation so you arent a couch-potato. however, if you want to relax and sleep, dont take them together.
coffee lasts around 4-6 hours for most people, but caffeine is found in trace amounts 15hrs after you drink the coffee, but most coffee drinkers are tolerant and effects wear off in 2-6 hours depending on your tolerance.
idk your timezone or what time it is, but 5:30 was 12 hrs ago for me, and that is definitely enough time for the xanax to be fully effective.
me personally, i dont like the two together, coffee is dirty and messes up the xanax buzz IMO/IME but different strokes for different folks.
realy you dont have to wait any amount of time, you will be fine...