Answer: Let's call the number of good oranges in the first basket "x" and the number of good oranges in the second basket "y". We know that:
x + y = 22 (since the sum of the number of oranges in the two baskets is 22)
xy = 120 (since their product is 120)
We want to find the number of good oranges in the basket with more oranges, assuming that 5 of them are bad. Without loss of generality, we can assume that x ≤ y, so the basket with more oranges is the second basket.
If 5 of the oranges in the second basket are bad, then the total number of oranges in the second basket is y + 5. Since x + y = 22, we know that x = 22 - y. Substituting this into the equation xy = 120, we get:
(22 - y)y = 120
Expanding and rearranging, we get a quadratic equation:
y^2 - 22y + 120 = 0
We can solve this equation by factoring or using the quadratic formula:
(y - 10)(y - 12) = 0
The solutions are y = 10 and y = 12. Since we assumed that x ≤ y, the number of good oranges in the first basket is x = 22 - y. So we have:
y = 10: x = 22 - y = 12
y = 12: x = 22 - y = 10
Therefore, the number of good oranges in the basket with more oranges is 12 (since y = 12 is the larger of the two solutions), and there are 12 - 5 = 7 good oranges in that basket.