Which adapter do I need to use older Nikon2x lens with new Nikon D5100 SLR camera?
This adapter won't work. It's for mounting the new screw-on accessories for high-end cameras, such as the DR-5 right-angle finder, on older cameras, which use screw-on eyepieces whose thread is a different size.
For the D5100, you'll need part 2370. Its name on various sites where you can buy it is inconsistent, but Nikon calls it both the "Nikon Eyepiece Adapter," and the "DK-22."
It's also referred to as "Nikon Eyepiece Adapter Required to Attach Eyepiece Accessories to Many Film & Digital Cameras," and as "Nikon Eyepiece Adapter 2370."
It's a plastic piece that slips onto your viewfinder, like your eyecup does. It's made entirely of plastic, including the threads, which will wear out eventually. You'll want to buy at least two.
Additionally, the D5000 uses a flip-out type LCD monitor which will interfere with the adapter. Use it with the LCD in the closed position only. I can't speak for the D5100, but the same likely applies.
Take note, though, that the rectangular eyepieces are much less secure than the screw-in ones. The eyecup for my D300S falls off at least twice during every gig I shoot (I'm shocked I haven't lost it yet.). A DG-2, with its larger size, is even more likely to do so.
Make sure you (very tightly) tie some sort of cord around the narrower section between the eyecup and the hinge, to act as a tether or neck strap. Tie another knot on the excess cord, just past your main knot, to help prevent it from loosening. Perhaps look up the climbing knot known as the "safety knot," used for just such a purpose. You could also just use an "overhand knot," but those loosen over time. I've also seen numerous reports that the adapter is prone to breaking. Yet another reason to buy two, and to go ahead and make a strap of some sort.
By the way, if you eventually upgrade to a high-end camera with screw-in accessories, you'll want the "DK-7 Eyepiece Adapter Ring."
I hope this helped. Have a great day, and keep shooting!