From t= 0 to t=2, distance is a straight line, and hence speed is slope of that line.
Hence for 0<=t<2, speed =
![(8-0)/(2-0) = 4 km/h](https://img.qammunity.org/2019/formulas/mathematics/middle-school/tva82fctskywy3ddwe0l6it9zx6ja80nyo.png)
From 2<=t<=2.5, distance remained constant at 8km, hence speed is 0 km/h.
From 2.5<=t<3, distance again a straight lines.
And hence speed = slope of line joining (2.5,8) and (3,10)
=
![(10-8)/(3-2.5) = (2)/(0.5) = 4 km/h](https://img.qammunity.org/2019/formulas/mathematics/middle-school/ef4x2mx983o05jbkmutjf112d1izk6hb9u.png)
From 3<=t<4, distance remained constant at 10km. That means he is at rest.
Hence speed = 0 km/h for 3<=t<=4.
From 4<=t<5, distance again is a straight line.
Hence speed = slope of line joining (4,10) and (5,12)
=
![(12-10)/(5-4) = 2 km/h](https://img.qammunity.org/2019/formulas/mathematics/middle-school/f8hx7s3fe2e9wcbi7jcnzb7x2lba2x73gi.png)
Please refer the graph for speed.