I believe what is needed is more arithmetic than pure algebra. So here we go:
If $w=3m$ then when $m = 1, w=3(1)=3$; therefore, the ratio of $w$ to $m$ is 3:1.
Likewise, when $m=2, w=3(2)=6$. Note that the value of $w$ is always three times the value of $m$.
The ratio of w to m is $w : m = \frac{w}{m} = \frac{3m}{m} = \frac{3}{1} = 3:1.$