The 22kohm seems quite high to me - make sure the transistor opens enough.
For example, let's say the relay needs 100mA to work, and the npn transistor has a minimum hFe of 80 and an average of 100. You need the transistor to let 100mA flow.
If the transistor has hFe of 80-100, then be conservative and assume the hFe could be as low as 70 in some cases so that means that to have 100mA pass from collector to emmiter, you would need about 1.5mA at the base (1.5 x 70 = 105mA)
To get the resistor value ... you have ohm's law V = I x R but don't forget there's a 0.6v drop on the npn transistor so 5v arduino - 0.6v drop = 0.0015 x R => R = 4.4 / 0.0015 = 2933 ohm. I would just go with a 2700 ohm resistor and allow up to about 2mA on the base.
The pdf is not clear about how that diode is connected. The protection for the relay voltage is like this:
If you want the led to light up when relay works, connect +
before after relay at 12v and the negative after relay, before npn transistor. 12v ---> resistor ---> + led - ---> after npn. Choose a resistor accordingly. Led has about 2-3v, and you want to let about 20mA go through the led so again v = i x r = > 12v -3v = 0.002 x R => R = 9/0.020 = 450 ohm so you can pick 470 ohm or something around that value, whatever is convenient. 10-20mA will be plenty bright, so no need to be super exact with the resistor, but 100 ohm will allow too much current (maybe about 70-100mA through the led) and will burn it.
edit : corrected the led paragraph, i wrote something stupid before.