I’ll provide you some context from someone who got into this hobby the same way you may be about to. I needed a tool to eliminate groundhogs. I went into it looking to do it as affordably as possible. Now over 15 years later I am in this as a full on hobby and have probably spent close to $10,000 in it. I don’t regret it, but it was not what I planned . . .
If that is not something you want to risk, and you truly want the cheapest option, then it might even be cheaper to just go down the path of hiring a pest control company. The options of inviting friends to take care of the problem for you is a great one. The groundhogs could be elusive and it could take time. Trapping and dispatching will be the easiest.
If you chose the Airgun path and face the decision of .22 vs. 25 caliber, both can do the job, with the edge going to .25 obviously. With both calibers, I have had what I thought were excellent shots result in the animal running off. The most extreme example of that was one that I hit with what I thought was a good headshot, resulting in a backflip and legs twitching in the air, and I thought I was done. But then it hopped up and ran off behind cover quickly to die somewhere else, so I missed my chance for a second shot. Groundhogs are hard to kill. After that I made it a rule to always hit them with a second shot as fast as as I could. Now I use my 22 Huben semi auto, hit them in the head, and then immediately pop them two or three more times to make sure they’re fully anchored. That is something that is very hard to do with a lever or bolt action repeater, but easy with the Huben - they never move more than a few feet now.
To minimize the risk of spending too much, I actually suggest spending a bit more upfront. The better a gun you get, the happier you will be with the purchase in the long run. I’m not saying go and buy a top-of-the-line rig, but don’t cheap out. Get a good repeater, because you’re going to need to take more than one shot in many cases. And you can start with a hand pump if you want to - it will get the job done, but if you end up wanting to shoot more, you’ll likely end up buying a direct fill compressor. And once you have that, the decision to buy another gun is a lot easier - even justified. And then rabbit hole is entered . . .
Good luck with whatever you decide to do.