It's great that you want to get into this. For $500 you might be able to pick up a new entry level road bike, or you could pick up a decent used bike. If you want to be competitive you need a decent bike. Even an old steel frame road bike will beat a mountain bike or a hybrid. In a sprint triathlon you will see every kind of bike imaginable from $10,000 custom made tri bikes to 30 year old 25 lb. Shwinns with the dust still on them. At Olympic level tri's it's practically all road bikes, and half of those are tri bikes. I haven't done any longer tri's but imagine they are mostly expensive tri bikes.
Don't be afraid to go into a bike shop, go into several. Ask questions, test ride bikes. If the sales person is helpful or not knowelagble, ask for the manager. Fit is key to getting a bike that you will want to ride.
If you can only have one bike, you should get a road bike. You can't road race with a Tri bike, group rides frown on them, you can put aero bars on a road bike. The geometry of the two kinds are a little different, as is riding position.
If you have the floor space for one bike, you can buy a stand (or make one) where you can stack one on top of the other. So, you do have space for two bikes.
New helmet, in the correct size. Stay away from the cheap "one size fits nobody" style.
You need a bike bag to carry your spare tube, bike levers, and some way to inflate it. You will need to know how to change your own flat. If you flat out in competition you have to change your own tire otherwise it's outside assistance. You will also want a cyclometer, the cheaper ones will give you speed, distance, and average speed.
As for gear; minimum is a decent pair of bike shorts, a couple of jerseys, and a pair of bike gloves. Train in the bike shorts, for competition you will probably want a pair of Tri shorts, which are lightly padded and dry quickly. Bike shops put a large markup on the gear, you can get it on-line cheaper. Buy the bike and helmet at the bike shop. You can ride in running tops or a sports bra, but the pockets in the back of the jerseys come in handy.
Yes you need a decent pair of sunglasses, wraparound style. The kind with interchangeable lenses are great for changing light conditions. Do NOT ride with out protective lenses, getting a bug in your eye at 18 mph is not fun, or getting a rock kicked up by a passing car. You should already own a decent pair of sunglasses and be wearing them when you go outside. Long term exposure of UV rays are not good on your eyes.
We havent even gotten into the shoes / pedal discussion. For now let's assume you will be riding in running shoes with caged pedals (toe clips). At some point you will want to upgrade to bike shoes with clipless pedals. The pedals you had on your bike when you were a kid are called open pedals, they do not give you an effecient pedal stroke. You need to pull up as well as push down to get a nice round pedal stroke.
I don't think $500 is going to cover what you are after, but it's a start. Start saving your money, this is an expensive sport to start. Once you get the bike, you can ride for free!