I have got a coordinate $(x_1,y_1)$ say, $(10,12)$ and a slope of $3$. Now I need to find a coordinate $(x_2,y_2)$ such that is $4$ units away from $(x_1,y_1)$.
I know the formula $d = \sqrt{(y_2-y_1)^2 + (x_2-x_1)^2}$ but I don't have either $x_2$ or $y_2$ to proceed with it.
Observe that, since the slope is $3$, you have that $$\frac{y_1-y_2}{x_1-x_2}=3\implies x_2=x_1-\frac{y_1-y_2}3$$ Substitute this in your distance formula to obtain $y_2$ and the compute $x_2$.