The average speed in the first 2.5 s can be calculated by dividing the distance traveled during this time by the time, 2.5 s.
The distance traveled can be found as an area under the graph. For the first 2 seconds, the speed is 2 m/s, so the distance traveled in the first 2 seconds is 2m/s * 2 = 4 m.
If after the 2 s the velocity changes to - 3 m/s, that means the ball is now traveling in the opposite direction with the speed 3 m/s. The distance covered in 0.5 s is 3 m/s * 0.5s = 1.5 m.
The total distance traveled is
4 m + 1.5 m = 5.5 m
So the average speed will be 5.5 m / 2.5 s = 2.2 m/s