Transistors will work with the typical AtMega328 based Uno, Nano and Mega. But, if you have anything other than an AVR based processor, you will typically not have enough pin output current to drive your specific load. Since your saying it’s 3.3 volts, it’s probably an ARM based part so there you’ll need to use a Mosfet.
Why? Because you need about 10 milliamperes to drive a bipolar transistor for that relay. A mosfet is voltage controlled, not current and while it needs a bit of current at turn on, once on, it need virtually no current to remain on.
If you do have an AVR processor running at 3.3 volts, here is an answer to the question in you post:
A: R1 = 200 ohm (180 ohm okay too), R4 not critical at 10K.
B: Don’t bother. It inverts the signal, provides no benefit and just adds cost and complexity. It’s drawn upside down as well.
It’s not an amplifier. While current gain occurs, it’s not linear, it is operating as a switch and you always want the transistor to saturate, otherwise it will burn up if allowed to operate in its linear region as an amplifier.
Resistor values are easy to calculate with ohms law once you know that to operate as as a switch, you want about 10% of the collector current to flow in the base.
To solve for R1:
3W / 24V = 0.125 amps relay coil current
0.125 * 10% = 0.0125A Q1 base current
If your drive voltage is 3.3V, subtract 0.7 for the base to emitter voltage drop. So, thats 2.6 volts.
To get 0.0125 amps at 2.6V, use ohms law R = E / I
So R = 2.6 / 0.0125 = 208 ohms. Closest 5% value would be 180 ohms, 1%, 200 ohms.
R4 not really required but 10K will keep any stray noise from possibly causing turn on when the driver pin floats, that is when neither high or low.
If you choose or need to use a mosfet, a good non-smd part is the FQP30N06L and a schematic would be: