The total scores of the x students from class A can be calculated by multiplying x and the average which is equal to 85. That is 85x.
In similar manner, we are able to find for the total scores of the students from Class B. That would be, 90y.
Combining the scores, the new average then becomes 88. This is equal to,
(85x + 90y) / (x + y ) = 88
Cross-multiplying,
85x + 90y = 88x + 88y
Combine all the x's and y's in each side of the equation.
85x - 88x = 88y - 90y
Combining terms,
-3x = -2y
The ratio is obtained through the step below,
-3x/-3y = -2y/-3y
x/y = 2/3
Thus, the ratio is 2/3.