For this case we propose a system of equations:
x: Variable representing the amount of oranges
y: Variable that represents the amount of grapefruit
We have to meet a citrus gift package:

From the second equation we have to:

We replace in the first:

Thus, the package has 3 grapefruits.
On the other hand:

Thus, the package has 9 oranges.
Answer:
9 oranges