So I have a straight line, in the classic $y = mx + b$, and I'm just trying to translate the formula for the line a certain distance along its normal.
For example, with this graph, how would I translate the red line to the blue one if (for example) $x$ was $4$?
The line $ y = mx + b $ has a slope $ \tan \phi =m $. It should be parallelly displaced through distance $d$.
The $y$ intercept increases or decreases by an amount
$$ d \sec \phi = d\, \sqrt{1+m^2}$$
so that the displaced line is
$$ y = mx + b \pm d\, \sqrt{1+m^2}. $$
PS: Please avoid using same symbol $X$ in the graph used for a variable of the straight line.