In simple terms, for 'ridability' on different terrains...this is the way I'd choose.
Trek is 8 speed with an 11/32 on the rear.
Giant is a 7 speed with a 14/34 on the rear.
Both are 28/38/48 cranks etc.
So if you consider your terrain and fitness....in hilly areas the Giant will be more forgiving with a 34t but with the 14t, you'll have to pedal much faster on the flat.
On the other side, the Trek will be slightly harder work on the hills with a 32....but the 11t will mean, if your fitness allows , you will find it slightly easier at speed.,not have to pedal as fast.
Flat terrain, the Trek.
Hilly terrain,or if you fitness is low, the Giant.
The Trek has better components and is 8 speed, that's why it's dearer.
Both are probably fine bikes..