First, you have to find the midpoint of the segment. Using the midpoint theorem, (which is (x1+x2)/2, (y1+y2)/2 ) the midpoint of that segment in (3,-1)
Next find the slope of the segment 1,0 and 5,-2 using rise over run or deltax / deltay which is a fancy way of saying change in x over change in y.
The slope is 4/2 or 2
When a line is perpendicular to another the slope is the negative reciprocal so the slope of our new line will be -1/2
Now plug in the coordinate (3, -1) to find the y-intercept and the equation of that line will be complete
so -1 = -1/2 (3) +b
-1= -1.5 +b
0.5 = b
The final equation will be -1/2x + 0.5 =y
hope this helps:)