To calculate the middle of a line you can just average the points: $x = \dfrac{x_1 + x_2}{2}$ and $y = \dfrac{y_1 + y_2}{2}$
But how can I calculate the coordinates of a point $Q$ wich lies on $\frac13$ of line $PD$ with $P(2,3)$ and $D(4,-8)$?
To calculate the middle of a line you can just average the points: $x = \dfrac{x_1 + x_2}{2}$ and $y = \dfrac{y_1 + y_2}{2}$
But how can I calculate the coordinates of a point $Q$ wich lies on $\frac13$ of line $PD$ with $P(2,3)$ and $D(4,-8)$?
The section formula gives a formula for a point $Q$ between $P = (x_1, y_1)$ and $D = (x_2, y_2)$ such that $\frac{PQ}{QD} = \frac{m}{n}$ as:
$$Q = \left(\frac{mx_2 + nx_1}{m+n}, \frac{my_2 + ny_1}{m+n}\right)$$
so in our case we have $\frac{PQ}{QD} = \frac12$ so
$$Q = \left(\frac{1\cdot 4 + 2\cdot 2}{1+2}, \frac{1\cdot (-8) + 2\cdot 3}{1+2}\right) = \left(\frac83, -\frac23\right)$$