perpendicular to line y=7x+1 (rearranging it) -> 7x-y=1
for a line to be perpendicular just interchange the constant of the 2 variables and change the sign of y
x+7y+P=0
now we have to solve for P using the formula of distance from a line to a point
d=| (Ax_{1} + By_{1} + P)/(sqrt(A^2 + B^2)) | (absolute value)
where:
d=sqrt2
x_{1}=4
y_{1}=-2
A=1
B=7
sqrt2=| { (1*4) + (7*-2) + P }/(sqrt50) |
solving for P gives you P=20 so the line is x+7y+20=0