It really is personal preference, so i will just list advantages of each.
G22- knock down power, amunition avaliable in most cases were 9mm is not avaliable, the abundance of police trade in G22s make it cheaper
G17- more capacity, less recoil in theory, ammo cheaper than 40, also makes a great production/ all around action shooting sports gun
If i were to be in your position i would without question go with the G17 as the capacity is greater and the modern day 9mm amunition is very impressive in terms of balistics and such