Consider the points:
$$A(2a, a) \hspace{2cm} B(2b, b)$$
with $a \ne b$ and $a, b \in \mathbb{R}$. Find the point $M(x, y)$ such that $\vec{AM} = 3 \vec{MB}$.
First thing I tried was to plot everything we know so far. Here's what the graph looks like with $a = 2$ and $b = 4$:
So it's clear that what I have to do is find the point $M(x, y)$ on the segment $[AB]$ such that we have $\vec{AM} = 3 \vec{MB}$. I thought that an interactive graph would be helpful to see how thing move around, so here it is.
What I did first was create the vectors
$$\vec{OA} = \begin{pmatrix} 2a \\ a \end{pmatrix} \hspace{2cm} \vec{OB} = \begin{pmatrix} 2b \\ b \end{pmatrix}$$
Then I got the vector $\vec{AB}$:
$$\vec{AB} = \vec{OB} - \vec{OA} = \begin{pmatrix} 2(b - a) \\ b - a \end{pmatrix}$$
Now since we need $\vec{AM} = 3\vec{MB}$ that means that the point $\vec{AM}$ is situated at three quarters length of the whole vector $\vec{AB}$. So since we now have the vector $\vec{AB}$ we just need to shorten this vector, while keeping its direction. So I created the matrix:
$$X = \begin{pmatrix} \dfrac{3}{4} & 0 \\ 0 & \dfrac{3}{4} \end{pmatrix}$$
The matrix $X$ squishes each vector to three quarters of its length.
So now we have:
$$\vec{AM} = X \cdot \vec{AB} = \begin{pmatrix} \dfrac{3}{4} & 0 \\ 0 & \dfrac{3}{4} \end{pmatrix} \begin{pmatrix} 2(b - a) \\ b - a \end{pmatrix} = \begin{pmatrix} \dfrac{3(b - a)}{2} \\ \dfrac{3(b - a)}{4} \end{pmatrix}$$
So we can now find the coordinates of $M$.
$$\vec{OM} = \vec{OA} + \vec{AM} = \begin{pmatrix} 2a \\ a \end{pmatrix} + \begin{pmatrix} \dfrac{3(b - a)}{2} \\ \dfrac{3(b - a)}{4} \end{pmatrix} = \begin{pmatrix} \dfrac{a+3b}{2} \\ \dfrac{a+3b}{4} \end{pmatrix}$$
So we can conclude that the point $M$ is at:
$$M \bigg ( \dfrac{a+3b}{2}, \dfrac{a+3b}{4} \bigg )$$
My question is: Is this correct? We've never used matrices like this before in class, it's just an idea that came to me, so I have no idea if my work is correct, even though it seems right. And if it is correct, what is another way of solving this problem? I couldn't come up with any other solution, so that's why I had to do this "slight of hand".

It'd be simpler to operate in vector space directly. Note,
$$\vec{AB}=\vec{AM} + \vec{MB} = \vec{AM} + \frac13 \vec{AM} = \frac43 \vec{AM}\implies \vec{AM} = \frac34 \vec{AB}$$
Thus,
$$\vec{OM} = \vec{OA} + \vec{AM} =\vec{OA} + \frac34 \vec{AB} = \vec{OA} + \frac34 (\vec{OB} - \vec{OA}) = \frac14 \vec{OA} + \frac 34 \vec{OB} $$ $$=\frac14(2a, a) + \frac34 (2b,b)= \left(\frac{a + 3b}{2}, \frac{a + 3b}{4}\right)$$