Solve for the dog's displacement during segments A and B (0-20s)?

The dog walked 5 meters backwards in the first 10 seconds, then 5 meters forward from 10-20 seconds. After 20 sec he was back where he started. Displacement (20sec) = zero.
Explanation:
To find displacement using velocity - time graph, we need to find area under the curve during time period 0 to 20 seconds.
Displacement [ area of Triangle (b=10 units & h=1 units) - area of trapezium (sum of parallel sides=30 units & h=1 unit)
= (1/2 * 10 * 1) - (1/2 * 30 * 1)
= - 10 m