Use the .
The distance formula is made to find the distance between two points and you just have to use it three times in the order given of the points.
The distance formual is:
##d= sqrt ((x_2-x_1)^2+(y_2-y_1)^2##
Here ##x_2## means the second ##x## coordinate and ##y_2## the second ##y## coordinate and ##x_1## the first ##x## coordinate and ##y_1## the first ##y## coordinate.
Now plug in the numbers. You will get:
##d = sqrt((4-0)^2+(-1-2))^2##
##d = sqrt((-2-4)^2+(-1-(-1))^2##
##d = sqrt((0-(-2))^2+(2-(-1))^2##.
Once you have simplified those down completely add them and you have the answer. 🙂