Simply find the area under the velocity curve. Over the first 3 second interval, the area is that of a trapezoid with bases 2 and 5, so that area/distance traveled is
. For the last 4 seconds, the area/distance is
.
Then the total distance traveled is