To get the perpendicular we swap the coefficients on x and y, negating one of them. We get the constant by considering the line goes through (4,-1).
Original line:
2x - y - 7 = 0
Perpendicular through (4,-1)
x +2y = 4 + 2(-1) = 2
2y = -x + 2
y = -(1/2)x + 1
Answer: y = -(1/2)x + 1