Let \(a\) represent the number of apples and \(o\) the number of oranges. According to the problem:
1. The total number of apples and oranges equals 3 times the apples: \(o = 3a\).
2. Let \( x \) be the number of good apples, then the rotten apples are \( 2x \).
3. Let \( y \) be the number of rotten oranges, then good oranges are \( 2y \).
4. Total fruit condition equation: \( x + 2x + 2y + y = 3x + 3y \).
5. The basket can carry a maximum of 50 fruits, and it contains more than 40 fruits.
We want \( a + o > 40 \) and \( a + o \leq 50 \).
Since \( a + o = 4a \) (substituting \( o = 3a \)), the constraint becomes:
\(40 < 4a \leq 50\).
Solving, divide the inequality by 4:
\(10 < a \leq 12.5\).
Since \( a \) must be an integer, possible values are \( a = 11 \) or \( a = 12 \).
Let's check:
Therefore, the total number of apples and oranges is 48, which fits the expected range of 48 to 48.