Xanax is used as a brand name for a drug called alprazolam. It belongs to…