If the ratio is 4:7 thew the answer is 4/7 then the number is 4 and 7 you have de possibility to calculate like this
4/7=X/Y
3x+2y=59 and you gona have x=0.59 and y=1,0325 if you transforme 0,59 like a 4 then 0,59-------4 and y -------1.0325 then y=1,0325*4/0.59<=> y=7