The distance of the line from measured along the direction whose slope is , is
The equation of a line passing through and slope is
Suppose it cuts at such that. Then, the coordinates of are given by
Since lies on the line
Hence, required distance units.