# Solution:

We can let the number of apples = x and the number of oranges = y. Using these variables we can create the following two equations:

1) x + y = 10

Using the formula average = sum/quantity, we have:

2)  (40x + 60y)/10 = 56

Let’s first simplify equation 2:

40x + 60y = 560

4x + 6y = 56

2x + 3y = 28

Isolating for y in equation one gives us: y = 10 – x.

Since y = 10 – x, we can substitute 10 – x for y in the equation 2x + 3y = 28. This gives us:

2x + 3(10 – x) = 28

2x + 30 – 3x = 28

-x = -2

x = 2

Since x + y = 10, then y = 8.

We thus know that Mary originally selected 2 apples and 8 oranges.

We must determine the number of oranges that Mary must put back so that the average price of the pieces of fruit that she keeps is 52¢. We can let n = the number of oranges Mary must put back.

Let’s use a weighted average equation to determine the value of n.

[40(2) + 60(8-n)]/(10 – n) = 52

(80 + 480 – 60n)/(10 – n) = 52

560 – 60n = 520 – 52n

40 = 8n

5 = n

Thus, Mary must put back 5 oranges so that the average cost of the fruit she has kept would be 52 cents.