A stupid question but, if i start from point (x1, y1) and go to point (x2, y2), its parametrized equation with respect to time t and velocity v is given as,

$x = frac{v (x_{2}-x_{1}) t} {sqrt{(x_{2} – x_{1})^{2} + (y_{2} – y_{1})^{2}}} + x_{1}$

How can we derive this? I am trying to derive the same equation for (x,y,z) for motion planning, the denominator term is the distance but how should the numerator be changed when we have an additional z-axis present?