Step 1 :
Equation of the given line is
Slope of this line is -1.
Equation of the required line which is perpendicular to the above line is
This line passes through the point (1,2)
$ \therefore 1-2+k=0$
$ \Rightarrow k-1=0$ or $ k=1$
Hence equation of the required line is
Hence B is the correct option.