in plain and short, we simply divide the whole amount by (1+3), and then distribute accordingly.
[tex]\bf 1:3\qquad \cfrac{1}{3}\qquad \cfrac{1\cdot \frac{40}{1+3}}{3\cdot \frac{40}{1+3}}\implies \cfrac{1\cdot 10}{3\cdot 10}\implies \cfrac{10}{30}[/tex]