A sports company conducted a road test of a new model of a geared bike. The test rider cycled (3x − 2) miles on a flat road, (x2 − 5) miles uphill, and (2x + 7) miles downhill. Which simplified expression is equivalent to the total distance, in miles, for which the bike was tested?