Question:

A line passes through the points: $\displaystyle A(1,1)$ & $\displaystyle B(5,7)$. Find the coordinates of $\displaystyle P$ if $\displaystyle P$ is three times as far from $\displaystyle A$ as from $\displaystyle B$.

Attempt:

I know that I can find the points of $\displaystyle P$ using this formula: $\displaystyle X = x_1 + r(x_2 - x_1$) & $\displaystyle Y = y_1 + r(x_2 - x_1)$, but how can I find $\displaystyle r$?