Which is the best mode to take a photo through a microscope, using a Nikon d5200 through a lens
You can hand-hold the camera to the eyepiece of the microscope. Best to mount a UV filter atop the camera lens, such a filter will serve to prevent scratches.
When the microscope (same for telescope) is focused for your eyes, the light rays emerge from the instruments eyepiece as parallel rays. These rays are said to be "afocal" meaning they do not converge or diverge to a focus. The afocal position allows you to abut your camera to the eyepiece. You can make an adapter using PVC pipe or you can purchase afocal adapters.
Check out this link for ideas.
Best way would be a t-mound adpater. You can try to hand hold it but because of the aperture difference of the microscope versus your DX lenses this will be almost useless. (You may have good luck with a cellphone or a pinhole lens for your Nikon.)
Definately dont hand hold. If your microscope has an eyepiece that can be taken out, you can use a barlow lens.
check that out.
Go to B&H photo and video's website, and you can chat with them about how toget one.