From Chapter 10, Part 3, Exercise 13 of Serge Lang's Basic Mathematics:
If two lines are not parallel, prove that they only have a single point in common. [Hint: Let the two lines be represented parametrically by:
$\{P + tA\} \text{ t in } \mathbb R= \{(p_1,p_2) + t(a_1,a_2)\}$
$\{Q + sB\} \text{ s in }\mathbb R = \{(q_1,q_2) + s(b_1,b_2)\}$
The common point is determined by the values of t, s such that
$p_1 + ta_1 = q_1 + sb_1$
$p_2 + ta_2 = q_2 + sb_2$
The back of the book gives the following solutions for this system of equations
$s = \frac{a_2(p_1-q_1)-a_1(p_2-q_2)}{a_2b_1-a_1b_2}$
$t = \frac{b_1(p_2-q_2)-b_2(p_1-q_1)}{a_2b_1-a_1b_2}$
I'm wondering if someone could show me how these values for $s$ and $t$ can be arrived at from the initial equations
The given equations are linear in $s,t$, and they may be rewritten $a_1t-b_1s = q_1-p_1$ and $a_2t-b_2s = q_2-p_2$. Writing this in matrix form, we have $$\begin{pmatrix} a_1 & -b_1 \\ a_2 & -b_2 \end{pmatrix} \begin{pmatrix} t \\ s \end{pmatrix} = \begin{pmatrix} q_1-p_1 \\ q_2 - p_2 \end{pmatrix}$$ which is solved by $$\begin{pmatrix} t \\ s \end{pmatrix} = \begin{pmatrix} a_1 & -b_1 \\ a_2 & -b_2 \end{pmatrix}^{-1} \begin{pmatrix} q_1-p_1 \\ q_2 - p_2 \end{pmatrix}$$
By the formula for the inverse of a 2 by 2 matrix, the requested inverse is $\frac{1}{-a_1b_2 + a_2b_1}\begin{pmatrix} -b_2 & b_1 \\ -a_2 & a_1 \end{pmatrix}$, and the formulas for $s,t$ follow from carrying out the matrix multiplication.