3-Gun is silly expensive, especially if you're starting from scratch in the gear department. So my advice would be to start with pistol only, and stick to 9mm to keep cost down. So IDPA or USPSA, as was mentioned you'll gravitate towards one or the other naturally, so try them both.
First and foremost: DO NOT buy any competition specific gear until you've gone to your first match. If you want a Glock 17 or 34 anyways, have a nut, otherwise just go check it out and watch. I promise there will be dudes who will trip over themselves to let you shoot their toys. If you're close to any of the shooters on this board, I'd bet you can find an entire rig to try it out for free right here.
EDIT ADD: Second, you don't need lots of ammo to get very good. Dry fire is where the majority of your practice should be. You'll need to verify things in live fire periodically, but you can absolutely fit it into a student's budget.
Companies market guns as competition models that are either not legal or not even remotely competitive in the division they are legal for. Same goes for gear. A Glock 17 would work for both, even if it isn't ideal, but do not buy one that has been modified before you know what is legal for competition.
Here's some basics re IDPA and USPSA:
IDPA is less expensive based on typical round count for matches, you only need two spare mags and one double mag pouch. The rules punish inaccuracy more than USPSA, the stages are capped at a lower round count and the rules about cover and whatnot tend to slow down the pace. The stage designs and rules tend to leave less room for choices; my experience in this game is very limited but my impression was that there tended to be a "right way" to shoot a stage. A typical stage will have some sort of notional scenario like "you're at the mall and terrorists start shooting up the place, after you get your family behind cover you ...." then you'd engage the targets in accordance with the rules (tactical priority, use cover, no dropping loaded mags on the ground, etc). A Glock 17 would work here, the 34 is not allowed.
USPSA is a bit more expensive, sticking to 9mm you'd want to eventually shoot production division. I only mention that since that division is limited to 10 rounds in a mag, which is the same as what you'd be shooting in IDPA, but the max round count per stage is 32 in this game. So you'll want a min of 4 extra mags on your belt, 5 is better. That costs a bit more. Speed and accuracy are a bit more balanced, they're both very important. You'll read internet nonsense about it being about running around squirting bullets, and you'll see it at matches. Those people aren't good. That said, there's a learning curve and you end up missing a lot learning to go fast. The stages are supposed to be setup with freestyle in mind. In other words, a good stage presents options to the shooter and lets you do whatever you want as long as it's safe. The written stage brief might say "starting with heels on X's facing down range, handgun loaded and holstered IAW rule 8.1.1 & 8.1.2, at the starting signal engage targets as they become visible from within the free fire area." Then you'd shoot all the targets twice and knock down any steel in whatever order you want from anywhere inside the fault lines, none of the "tactical" rules apply. A Glock 17 would work here, but a 34 would be better mainly for the extra sight radius.
If it sounds like I'm a Glock fan boy, I'm not, I actually hate them, but they're hard to beat for value as long as you don't dump a bunch of money trying to make them something they aren't.