I have a raspberry pi 3 that runs on 5.1v but I have a battery that is 7.4v, what transistor do I need so I don't fry the rpb3?
As noted in the comments, you've misused resistor and transistor in your question and title. I guess you were hoping to do this with a resistor to drop the voltage? That won't work.
Here's why. Ohm's Law is V=IR. You need a 2.3 V drop, but to choose a resistance R you'd also need to know the current I. Unfortunately the current will vary, so this isn't going to work. (In addition the voltage on your battery will start to change as it drains, so that's more variation.)
You could use your battery with something like a buck converter, for example this one: https://www.adafruit.com/product/1385. (I'm not associated with Adafruit but I have used that converter.) That's a bit more complicated than a resistor, but it should do the job.
A resistor divider won't do. Remember that your RPi is, too, a resistance (vaguely put) in the circuit and it acts differently depending on the power consumption.
If you rather not get a new battery, I highly recommend a voltage regulator. They are not expensive. Look for one that can deliver enough current (2.4A, to be safe). Pololu should have something that fits your needs :)