1. you want something that isn't a dead-end obsolete platform, so pick a bike with at least a 7-speed Shimano Hyperglide rear cassette.
2. make sure it's actually a cassette rear hub, not a freewheel rear hub. Cassette hubs have better bearing support to resist axle bending/breakage, and there's more gearing options available for cassette setups.
3. Given your interest in higher performance on a 1h45min round-trip commute, the closer-spaced gearing options of a 9-speed rear, or even 10sp, would have benefits... with more gears between a given high & low gear, the jumps from one gear to the next can be smaller, so you stay closer to your optimal pedalling cadence.
4. Bike condition is not easy for a novice to determine. I've seen many people march in with their new prize they bought used, only to give them bad news: it's a Frankenbike (pieced together from multiple bikes, often not compatible with eachother), or it has serious frame/fork damage they didn't know how to recognize, or it has shot bearings or dented rims, or worn-out drivetrain, and so forth. And in the end, the cost of setting it right is sometimes prohibitive. So if you have a trustworthy LBS, consider taking any prospective used purchases to them for a quick glance.