Express AB and AC as a linear combination of AP and BQ 
In the triangle ABC there is a point P on the side  BC such |BP| = 3|PC| and the point
Q on the side AC such that 2|CQ| = 3|QA|. Write vectors AB and AC as a linear combination of the vectors AP and BQ

Attempt. So our goal is to express $\vec{AB}=m\cdot\vec{AP}+n\cdot \vec{BQ}$ where $m$ and $n$ are constants. (First thought to deal with AB and then with AC). I've used $|BP|=3|PC|\implies \sqrt{(P_x-B_x)^2+(P_y-B_y)^2}=3\sqrt{(C_x-P_x)^2+(C_y-P_y)^2}\implies\\ P_x^2-2P_xB_x+B_x^2+P_y^2-2P_yB_y+B_y^2=9C_x^2-18C_xP_x+9P_x^2+9C_y^2-18C_yP_y+9P_y^2$
But I thought this would lead nowhere, same when I tried with $|CQ|=\frac32|QA|$. Nothing much to say, other that I tried as well thinking that $\vec{CB}=\vec{AB}-\vec{AC}$ and $\vec{BQ}=\vec{AB}-\vec{AQ}$ and $\vec{PC}=\vec{AC}-\vec{AP}$ and $\vec{BP}=\vec{AP}-\vec{AB}$
 A: Assume position vector of vertices $A, B, C$ as $a, b, c$.
Then position vector of point $P = \displaystyle \small \frac{b + 3c}{4}$
Position vector of point $Q = \displaystyle \small \frac{3 a + 2c}{5}$
So $\vec {AP} = \displaystyle \small \frac{b + 3c - 4a}{4}$
$\vec {BQ} = \displaystyle \small \frac{3a + 2c - 5b}{5}$
That gives us two equations,
$\displaystyle \small b + 3c - 4a = 4\vec {AP}$ ...(i)
$\displaystyle \small 3a + 2c - 5b = 5\vec {BQ}$ ...(ii)
$2 \cdot$ (i) - $3 \cdot$ (ii) gives
$b-a = \frac{1}{17} (8 \vec{AP} - 15 \vec {BQ}) = \vec {AB}$
Similarly eliminate $b$ from (i) and (ii) to find $\vec {CA} ( = c - a) $
A: Let $$\vec{AB}=\mathbf{b},\\
\vec{AC}=\mathbf{c},\\
\vec{AP}=\mathbf{p},\\
\vec{BQ}=\mathbf{q}.$$
By the Ratio Theorem, $$\mathbf{p}=\frac14\left(\mathbf{b}+3\mathbf{c}\right)$$
$$\mathbf{b}+3\mathbf{c}=4\mathbf{p}\tag{1}$$ and $$\mathbf{q}=\frac15\left(-3\mathbf{b}+2\left(-\mathbf{b}+\mathbf{c}\right)\right)$$
$$5\mathbf{b}-2\mathbf{c}=-5\mathbf{q}.\tag{2}$$
$2\times(1)+3\times(2):$
$$\mathbf{b}=\frac1{17}\left(8\mathbf{p}-15\mathbf{q}\right) \\ \vec{AB}=\frac1{17}\left(8\,\vec{AP}-15\,\vec{BQ}\right).$$
$5\times(1)-(2):$
$$\mathbf{c}=\frac1{17}\left(20\mathbf{p}+5\mathbf{q}\right) \\ \vec{AC}=\frac1{17}\left(20\,\vec{AP}+5\,\vec{BQ}\right).$$
