The short answer is that the displacement is equal tothe area under the curve in the velocity-time graph. The region under the curve in the first 4.0 s is a triangle with height 10.0 m/s and length 4.0 s, so its area - and hence the displacement - is
1/2 • (10.0 m/s) • (4.0 s) = 20.00 m
Another way to derive this: since velocity is linear over the first 4.0 s, that means acceleration is constant. Recall that average velocity is defined as
v (ave) = ∆x / ∆t
and under constant acceleration,
v (ave) = (v (final) + v (initial)) / 2
According to the plot, with ∆t = 4.0 s, we have v (initial) = 0 and v (final) = 10.0 m/s, so
∆x / (4.0 s) = (10.0 m/s) / 2
∆x = ((4.0 s) • (10.0 m/s)) / 2
∆x = 20.00 m