Let $A,B$ and $C$ be points with position vectors $\mathbf{a}, \mathbf{b}$ and $\mathbf{c}$ respectively.
Let $C$ divide $AB$ internally such that $AC:CB = \lambda : \mu$.
$\overrightarrow{AB} = \mathbf{b}-\mathbf{a}$
Since the ratio $AC:CB= \lambda:\mu$, the ratio $AC:AB = \lambda:\lambda + \mu$.
Hence $\overrightarrow{AC} = \frac{\lambda}{\lambda+\mu} (\mathbf{b} - \mathbf{a})$.
$\mathbf{c} - \mathbf{a} = \frac{\lambda}{\lambda+\mu} (\mathbf{b} - \mathbf{a})$.
$\mathbf{c} = \frac{\lambda}{\lambda+\mu} (\mathbf{b} - \mathbf{a}) + \mathbf{a}$.
$\displaystyle \mathbf{c} = \frac{\lambda \mathbf{b} - \lambda \mathbf{a} + \lambda \mathbf{a} + \mu \mathbf{a}}{\lambda+\mu}$
Hence $\displaystyle \mathbf{c} = \frac{\mu \mathbf{a} + \lambda \mathbf{b}}{\lambda+\mu}$.
Solution to examples
Given that the point $P$ divides the line $AB$ in the ratio $1:2$, find the position vector of $P$.
Applying ratio theorem, $\overrightarrow{OP} = \frac{(-2\mathbf{i}+5\mathbf{k})+2(\mathbf{i}+2\mathbf{j}-3\mathbf{k})}{1+2} =$ $\frac{1}{3} (4\mathbf{j}-\mathbf{k})$.
Find the coordinates of $Q$.
Since $AB:AQ=2:5$, $B$ divides $AQ$ internally in the ratio $2:3$.
$\overrightarrow{OB} = \frac{2 \overrightarrow{OQ} + 3 \overrightarrow{OA} }{2+3}$.
$\overrightarrow{OQ} = \frac{5 \overrightarrow{OB} - 3 \overrightarrow{OA}}{2} = \frac{1}{2} (-13\mathbf{i}-6\mathbf{j}+34\mathbf{k})$.
Hence coordinates of $Q$: $\left (-\frac{13}{2}, -3, 17 \right )$.