The two points are:
$p = \left[ {\begin{array}{cc} -2 \\ 1 \\ 3 \end{array} } \right] q= \left[ {\begin{array}{cc} 5 \\ -3 \\ -1 \end{array} } \right]$
The following formula that I used was
$r = p + tq$
However in the example they did $q-p$
$q-p = \left[ {\begin{array}{cc} 7 \\ -3 \\ -2 \end{array} } \right]$
Therefore I did $r = \left[ {\begin{array}{cc}
-2 \\
1 \\
3
\end{array} } \right]
+ t\left[ {\begin{array}{cc}
7 \\
-3 \\
-4
\end{array} } \right]$
The final answer I got was:
$x = -2+7t$
$y = 1 -3t$
$z=3-4t$
I am just wondering if this the correct procedure?
One basic equation for a straight line in $\mathbb{R}^n$ for $n>1$ containing points $P$ and $Q$ is
$$ r(t)=(1-t)P+tQ\tag{1}$$
This gives $r(0)=P$ and $r(1)=Q$. For $0<t<1$, $r(t)$ is a point between $P$ and $Q$. For example, $r\left(\frac{1}{2}\right)$ is the midpoint of $PQ$.
Equation (1) may be rewritten as
\begin{equation} r(t)=(1-t)P+tQ=P-tP+tQ=P+(Q-P)t \end{equation}
Note that in your example, you still have the wrong value for $Q-P$. It should be
$$Q-P = \left[ {\begin{array}{cc} 7 \\\ -4 \\\ -4 \end{array} } \right]$$