I guess this is what's wrong with digital. You have to have a master's degree in something to figure out what your camera will actually do. I have a D7000 and the way I figure out how big I can print a photo is to print one and see what happens, all that math to figure it out lose's me. I'm getting a roll of paper to try 10x30 and maybe even a 13x38. Then I'll know what I can do and the only math needed is to subtract the cost of paper from my check book. I'm terrible at math! Why does it seem everything about digital needs to be turned into a science project?
There are some numbers, but planning is a really big help. It's really just simple arithmetic, as easy as the check book. I think the D7000 images are 4928x3262 pixels, and the dpi number spaces those pixels over the inches. Dpi is just that many pixels per inch. For a round number example,
3000 pixels spaced 300 per inch will cover 10 inches.
3000 pixels covering 10 inches are spaced 300 pixels per inch.
Specifically, to print 8x10 inches at 300 dpi needs
(8x300) x (10x300) = 2400x3000 pixels, so your camera has pixels to spare (for cropping, etc).
Learning that simple relationship should be a big help with printing all of your life. It's worth paying a little attention.

Same as a carpenter measuring before sawing. If ordering the 8x10 from the one hour printing place, then be sure to plan to send them enough pixels.
Many of the better photo editors provide a tool for cropping to an aspect ratio (image length / its width, in either pixels or inches or mm). A 6x4 print aspect is 6/4, simplified to 3:2 (also seen as 1.5:1).
This Aspect Ratio is a shape (and is as important as size), and it is wise to be sure the image to be printed is the same
shape as the paper size to be used.
The DSLR images are aspect ratio 3:2, and compacts and phones are 4:3. A 6x4 print is 3x2, but a 8x10 print is 4:5 (a different shape). So all image edges may not fit on the print paper, so to prevent surprises (like heads cut off, etc), it's very wise to crop to fit first.
This is not highly technical digital stuff, it's simply about the shape of the image and of the paper.
IMO, the best procedure is to first crop to the viewing aspect ratio (final choice of cropping selected by eye for the most pleasant viewing, like omitting some of the wasted blank surrounding space, etc.). And then resample smaller (only smaller) to the reasonable pixel dimensions to print it as desired.
Be sure to keep the original image file too, because you may have different plans next time.
If I understand your paper numbers correctly, then
to print 30 inches is 4928 / 30 = 164 dpi, and
and to print 38 inches is 4928 / 38 = 130 dpi.
Which is not 300 dpi (and 250 to 300 dpi is best for hand-held viewing), but a 3 foot print will be on the wall, viewed out at least at a few feet, and it should work fine for that. It is just if viewed at only one foot or so that you may see the difference. Two feet or more should be OK.