The best thing you can do is if you are serious about buying a boat, and have it narrowed down to one or two boats is see if the seller is willing for you to take it to a marine mechanic you know and trust, I'm sure cff members can offer suggestions on where to take it .. have them give the boat a good going over .. check compression , look at lower unit oil, etc .. they wont be able to tell you how long it will run with out issues, but they can give you a thumbs up or down if a good engine etc . It will cost you prob 75-150 depending on how much time they spend on it, but that money could save you hundreds later.
and if they will not .. then you prob need to walk away.
You could bring a compression tester with you make sure that compression is equal on all cylinders, check lower unit oil, should not be milky, and should be smooth not gritty, make sure prop is straight not chunks missing from it .. and edges smooth, and the foot should be straight too.
Should start easily, and when you test drive boat make sure you run it wide open for a couple three miles, after letting it idle at dock for a few minutes, should be no bucking, missing, and if you hear any alarms from over heating a buzzer that gets louder and louder. another thing to do is bring a laser temp sensor with you, you can borrow when free from auto parts stores with a refundable deposit.
If you remove the cover while running the engine have a friend monitor the engine temp while running wide open, of course be very very careful doing this as you could end up end the lake if not careful. and take temp at slower speeds, and idle.
For example a Johnson 1988 175 hp GOOD temp would be around 140 degrees but if your serious about buying that boat get a book for it and see what the specs call for for temps etc..
Knowledge is power, and can save you a bundle in the long run, do some research on the Internet google the brand and model of boat, or just ask here if anyone has owned that type and brand.
Dont get excited over a boat, let knowledge lead you not its glitter and sparkle .. or gadgets , make sure the hull , engine, trolling motor, or other major components are solid before you consider any bells and whistles it may have.
They are bargins to be had out there .. I have a friend who bought a 1999 20ft Ranger that had 49 hrs on it and was garage kept, for 3000 at a estate auction .. of course he bought it with out checking all these things .. but so would have I!