For two lines to be perpendicular their slopes must be negative reciprocals of one another, mathematically:
m1*m2=-1
In this case, our reference line has a slope of -2/5 so our perpendicular slope must satisfy:
-2m/5=-1
-2m=-5
m=-5/-2
m=5/2
....
The negative reciprocal property can be more easily understood by realizing that the angle of a line is:
tanα=m
α=arctanm
So if one line, A, has a slope of m and the other, B, has a slope of -1/m
A=arctan m, B=arctan -1/m
B-A=90° (feel free to use any value for m that you choose to see that this is true, so if the two lines differ by 90°, they are indeed perpendicular)