12/y+2/x=5/y+7/x=24. Therefore, 7/y=5/x and 7x=5y so x:y=5:7. Also y=7x/5 and if we substitute this value of y in 12/y+2/x=24 we get 12*5/(7x)+2/x=24. Multiply through by 7x: 60+14=24*7x=168x. So 168x=74 and x=37/84. That makes y=7*37/5*84=37/60. The ratio of x:y is 37/84:37/60 which is 1/84:1/60=1/12*7:1/12*5=1/7:1/5=5:7 (35/7:35/5=5:7).