Define a straight line
\gamma: [0,1] \to \mathbb R^2,
\gamma(t) = { \color{teal}\begin{pmatrix} x(t) \\y(t) \end{pmatrix}}
from the point
\mathbf {\color{red}A}
to the point \mathbf {\color{blue}B}
.
{\color{teal}x(t)}=
X + P-X * t
{\color{teal}y(t)}=
Y + Q-Y * t
The point \mathbf {\color{red}A}
has the coordinates {\color{red}(X,Y)}
,
and \mathbf {\color{blue}B}
is {\color{blue} (P,Q)}
.
For a straight line from {\color{red}(X,Y)}
to
{\color{blue} (P,Q)}
we need the direction vector.
This is {\color{orange}\begin{pmatrix} P-X\\Q-Y\end{pmatrix} }
.
Thus, we have the (obvious) parametrization
\gamma: [0,1] \to \mathbb R^2, \gamma(t) = { \color{red}\begin{pmatrix}X\\Y\end{pmatrix} }+
t \cdot { \color{orange}\begin{pmatrix} P-X\\Q-Y\end{pmatrix} }= { \color{teal}
\begin{pmatrix} X + P-X \cdot t \\
Y + Q-Y \cdot t \end{pmatrix}}
.