The quality of class a jelly is A/X, and the quality of class b jelly is a/y.
According to the meaning of the question, there is an equation (a/x+a/y) * (x-1) = 2 * a.
(A/X+A/Y)*(Y+0.5)=2*A
The equation is (1/x+1/y) * (x-1) = 2.
( 1/X+ 1/Y)*(Y+0.5)=2
The solution is X=?
Y=?