Xanax and productivity are opposites of eachother. I would highly suggest you dont use any benzo's during times u want to be productive. It might feel and seem okay when working, but u will greatly distort your brains storage/memory creation functionality. Not only will u store far less information then without benzo's, You will also; become more sloppy, have a lower "standard of quality" for your work, waste allot of time trying to recall declarative memories that would otherwise be instant, and your writing/language skills will be greatly reduced.
No matter how you combine it, or how low of a dose you use, benzodiazepines are counter-productive.
Amfetamines on the other hand could help you studying/being productive. I would advise on using low amounts to avoid being distracted by "over-stimulation". And only dose in the morning and afternoon. Avoid dosing in the evening/working all night, as this will affect your sleep. You might be able to fall asleep, and think; whats the big deal?, but the quality of your sleep will be greatly reduced with amfetamines in your blood. Quality of sleep = quality of memory storage / learning. The worst thing you could do is staying up all night trying to finish your work. Skipping a night of sleep will be very counterproductive and will greatly diminish your learning experience.
Some more tips; Get your diet in check, eat atleast 5-6 meals each day, consume "good" fats, stay away from fast acting carbohydrates (sugar) and depend mainly on slow carbohydrates for your energy. It is best to start learning/working in the morning, and try to do the heaviest tasks first. If you HAVE to learn in the evening also, try to do the easier mental tasks during that time.
Try to avoid stress, good planning is what helps here. And remember; improving your sleep quality will improve your productivity!. (Using drugs to induce sleep will NOT increase your sleepquality).
Source; I have been experimenting with different supplements for studying since I started med school, (10years ago) and continue to do so today. (I started studying again) During my study and work I've always had a great interest in the most effective ways to learn/study.
Good luck!