They look like different sizes.
The Cannondale has a 3x9 105 drivetrain and the Trek is a 2x9 Ultegra drivetrain. They are both old enough where if the drivetrains both shift properly, they are equal. The 3x or 2x may be something that you care about, not sure. As for the Trek wheels being nicer...assuming both bikes have wheels that are properly tensioned and true, I wouldnt really say one is measurably better than the other. Ive worked on 3 of those Bontrager Race wheels with bladed spokes and spokes in pairs- not really sure why that would be the more appealing wheel.
Personally, I would go with the Cannondale and work on hanging some newer components on it as time goes on.
You mention hills and based on only the pics, the Cannondale will have gearing that is more hill friendly for many riders.
Anyways, here is the order of importance since these are essentially the same cost.
- Fit. Whichever fits best, buy. If fit is equal then...
- Mechanical condition. Whichever is in the best mechanical condition, buy. If mechanical condition is equal then...
- Drivetrain style. Whichever drivetrain you like more, buy. If you dont care about 2x or 3x then...
- Cosmetic condition. If cosmetic condition is equal then...
- Buy whichever you think looks cooler.