the best thing to do is to test ride them both. i assume this is a mountain bike type bike. Look at frame size. you should have at least 1-2 inches of clearance between your crotch and your frame. When you sit on the bike, your arms and back should be about 90 degree angle, and you should be able to block the front axel with your handlebar. Look at the components. for 500$ you won't be getting much, but see how much Shimano LX components are on each bike. Look at the weight of each bike. even a couple of pounds will make a HUGE difference on a ride believe it or now. Also, does one bike have disk brakes? for one it will make the bike heavier, and 2, i doubt you really need them, unless you are doing some narly freeride or downhilling. Are they from two difference shops? what type of maintenance deals do each provide? (for example, mine does a basic one for free every year).
that's all i can think of.
good luck!
Han