The helicopter rose vertically, and then flew horizontally, so it's final displacement (distance from where it is now to where it started) is in the shape of a triangle.
The displacement is the hypotenuse of this triangle, with sides 300m and 400m.
We can work out this distance using Pythagorus' theorem, because we know that;

Where

is the hypotenuse, and

and

are the two other sides. So;
