A couple of questions on the 2N2222 transistor

When the NPN emitter is grounded Vbe is ~0.7V and base resistor is easy to calculate:
(5V - 0.7V)/20ma = Rbase
20mA should put the C-E junction into saturation and let the transistor act like a switch, with the current limited by the resister in series with the LED.

When the emitter is connected to the load, then Vb becomes Vf + (I-load x Rload) + Vbe + (Ib (from the Arduino) * Rload)
Just messy.

You can look up "Collector follower" vs "Emitter follower" for more info.

Ideally, you would have NPN for sinking current, and PNP for sourcing current.