1. Let x denote the number of apples in box A and y the number of apples in box B. Then the number of oranges in A is 42-x and in B 42-y.

2. You'll get a system of equations:

3. Solve for x and y. Afterwards determine the ration .

By the way: Are you sure that the wording of the question is correct?