Notez suma de bani cheltuita in total cu x.
cheltuie: [tex]\dfrac 13 x[/tex]
rest1: [tex]x-\dfrac13 x=\dfrac33x-\dfrac13x=\dfrac{3-1}{3}x=\dfrac23x[/tex]
cheltuie: [tex]\dfrac25\cdot rest=\dfrac25\cdot\dfrac23x=\dfrac{2\cdot2}{5\cdot3}x=\dfrac{4}{15}x[/tex]
rest2: [tex]\dfrac23x\:(rest1)-\dfrac{4}{15}x=\dfrac{10}{15}-\dfrac{4}{15}x=\dfrac{10-4}{15}x=\dfrac{6}{15}x=\dfrac{2}{5} x[/tex]
cheltuie: [tex]\dfrac25x\:(rest2)=18[/tex]
[tex]\implies \dfrac25x=18 \implies x=\dfrac5218=5\cdot9=45\:(RON)[/tex]