hi! can help us with this qn part (b)? tq!

_________

The ratio of the number of balls in Box A to the number of balls in Box B was 5:6 at first. 2/5 of the balls in Box A and 5/18 of the balls in Box B were red. The rest of the balls were yellow.

(a) What was the ratio of the number of yellow balls in Box A to the number of red balls in Box B at first?

(b) Ali took out a total of 50 balls from both boxes. He then put them back into Box A and Box B such that the number of red balls in each box became the same. The number of yellow balls in each box also became the same. In the end, how many yellow balls were there in each box?