See this maybe it helps.
The parametric equations for a line passing through , are:
You can also write a line in three dimensions in "symmetric" form.
Solving each of those equations, for t,
I notice you asked for "the" equation of a line in three dimensions. Because a line is only one dimension, you need to "reduce" two dimensions and so need either two equations (3- 2= 1), as I give or introduce a new parameter, t, giving 4 variables with 3 equations: 4- 3= 1.