All Q2 does is earth pin 24 of U3.
To ensure the transistor saturates fully a general rule of thumb is to supply the base with about 1/10 of the collector current. Because the base voltage is so low relative to the supply, we can generally make the base resistor 10 times the value of the collector resistor to achieve this. With the LM7805 now gone the supply to the base resistor is now 12V which is roughly double 5V ,I approximately doubled the value of the base resistor to keep the base current the same.
Nothing is critical here, you could use a 27k, 24k, 20k or 18k resistor I just chose 22k because it's an E3 preferred value and is very common.
Incidentally, something you should be aware of is that there are standard resistor and capacitor values.
https://en.wikipedia.org/wiki/Preffered_number#Capacitors_and_resistors
Although it isn't shown on Wikipedia, the E3 series exists as well, it consists of 10, 22 and 47 and is the most common, especially for electrolytic capacitors.
In general try to design your circuits to use resistor values mostly in the lowest E-series you can, for example if you can don't use a 30k resistor (an E24 value), if you can use a 33k resistor or even a 22k resistor.