Let the points A(4,1) and B(2,3).
We know that the equation of line passing through two points,
y−y1=y2−y1x2−x1(x−x1)
y−1=3−12−4(x−4)
y−1=2−2(x−4)
y−1=−1(x−4)
y−1=−x+4
x+y−5=0 ……. (1)
Since, the distance from the point (4,2) to above line
d=1×4+1×2−5√12+12
d=4+2−5√2
d=1√2
Hence, this is the answer.