x-suma initiala
2/3 din x +15 = 2/3 * x +15 = 2x/3 +15 = (2x+45)/3 -prima data
x-(2x+45)/3= (3x-2x-45)/3= (x-45)/3 -restul
2/5 din (x-45)/3= 2/5 * (x-45)/3= (2x-90)/15 -a doua oara
(x-45)/3 - (2x-90)/15= (5x- 225-2x+90)/15= (3x -135)/15 -noul rest
(3x-135)/15=36
3x-135= 540
3x= 540+135
3x=675
x=225