In math in general, a ratio is a way of comparing two (sometimes more than 2) different values.
To put it more simply, a ratio tells you how how many of x you would have for y. For example, ratio 2 : 3 means, every time you have two of x, there would be three of y. That implies that, if you multiply x by 2, you must multiply y by 2, and so on.
The ratio of x : y is 5 : 2. This means everytime x occurs 5 times, y occurs 2 times. Hence, if you have both x and y that would be seven in all (5 + 2 = 7).
In all, x would be represented by 5/7 (5 out of 7), and y would be represented by 2/7 (2 out of 7).
Simply put;
Now, you have the sum total of x and y given as 49. So, rather than having x + y = 7, we now have x + y = 49.
That means the total has increased by a factor of 7 (total is 49/7 = 7)
Therefore, the value of x would also increase by a factor of 7, and that is 5 x 7, which equals 35.
The new ratio (when the total is 49) is now;
That is, the new ratio is now,
35 : 14