slope of a line in 3D coordinate system
Solution 1:
In two dimensions, we often write a line in the form $$y = mx + b.$$
However, there are other equivalent forms. Given a point $(x_0, y_0)$ on a line and the slope of the line, we can also write $$y - y_0 = m(x - x_0).$$
A disadvantage of this formula is that it cannot express lines where $x$ is constant, for example, the line $x=3$ (this problem arises because we have defined $y$ as a function of $x$). To remedy this problem, we might instead write the line in parametric form: $$\left\{\begin{array}{}y = y_0 + m_yt\\ x = x_0 + m_xt\end{array}\right.$$
We can make this formula slightly more compact by using vector notation:
$$\langle x,y\rangle = \langle x_0, y_0\rangle + t\langle m_x, m_y\rangle.$$
In this form, we call the vector $\langle m_x, m_y\rangle$ the direction vector. It turns out that the direction vector is a useful analog of slope in higher dimensions: in two dimensions, the ratio between the change in $x$ and $y$ is $\Delta x:\Delta y = m_x : m_y$, and this is true even if $\Delta x = 0, \Delta y \not= 0$.
In three dimensions, we have
$$\langle x,y,z\rangle = \langle x_0, y_0, z_0\rangle +t\langle m_x, m_y, m_z\rangle.$$
For your particular example, we can pick $\langle x_0, y_0, z_0\rangle = \langle 5,5,5\rangle$, $\langle m_x, m_y, m_z\rangle = \langle 1,2,3\rangle - \langle5,5,5\rangle= \langle-4,-3,-2\rangle$, so the line can be expressed as
$$\langle x,y,z\rangle = \langle 5,5,5\rangle +t\langle -4,-3,-2\rangle,$$
and the line has the direction vector $\langle -4, -3, -2 \rangle$. Observe that by varying the value of $t$, we can get other points on the line: $t=0$ corresponds to $p_1$, $t=1$ corresponds to $p_2$, and other $t$ values will correspond to other points.
You can find more information about writing lines in three dimensions as vector functions here.
Solution 2:
When moving on from two- to three-dimensional geometry, we need three different slopes to characterize the line passing through two points. These can be pictured as the slopes of the "shadows" or projections of the line onto each of the three coordinate planes.
The segment connecting $ \ p_1 \ $ to $ \ p_2 \ $ has a length $ \ \sqrt{(1-5)^2 \ + \ (2-5)^2 \ + \ (3-5)^2 } \ = \ \sqrt{29} \ $ . The "slopes" , called direction cosines, on the $ \ xy- \ , \ xz- \ $ and $ \ yz-$ planes are then
$$ \frac{3-5}{\sqrt{29}} \ = \ \frac{-2}{\sqrt{29}} \ \ , \ \ \frac{2-5}{\sqrt{29}} \ = \ \frac{-3}{\sqrt{29}} \ \ , \ \ \frac{1-5}{\sqrt{29}} \ = \ \frac{-4}{\sqrt{29}} \ \ , $$
respectively. If it doesn't matter whether you are going from $ \ p_1 \ $ to $ \ p_2 \ $ or vice versa, you can just take the absolute values of these numbers. (Notice that the sum of the squares of these values equals 1 . )
There are other ways in which the behavior of the line in three-dimensional space is described as well. You can find discussions of the topic of lines and planes in three dimensions as a section in books on analytic geometry or multivariable calculus (this hasn't much to do with calculus as such, but that's often where this is treated in the curriculum), or online sources.