Yes, it is possible you have become dependent on the Xanax. It also sounds like you may have developed tolerance to the temazepam and may be experiencing symptoms of interdose withdrawal from the temazepam, Xanax, or both. Regrettably, both temazepam and alprazolam (Xanax) have short half-lives.
The likelihood of a successful taper is increased if you begin the taper from a place of stability. Have you considered talking to your prescriber about (a) dosing the Xanax more frequently and spacing the doses evenly to avoid peaks/troughs in blood levels and/or (b) substituting an equivalent dose of a longer half-life benzodiazepine for the temazepam and Xanax via a stepwise ‘crossover’ per the Ashton Manual?
I’ll close by leaving a link to a Benzodiazepine Deprescribing Guidance Document both you and your prescriber might find of interest/help. The document was developed by the Benzodiazepine Action Work Group of the Colorado Consortium for Prescription Drug Abuse Prevention. It is up-to-date, concise, and evidence-based. Several members have shared it with their prescribers with positive results.
Link:
Benzodiazepine Deprescribing Guidance Document (January 2022)
https://corxconsortium.org/wp-content/uploads/Benzo-Deperscribing.pdf