Farmer Daniel had a total of 128 apples, oranges and pears. 1/4 of the fruits were apples. The ratio of the number of oranges to the number of pears was 5:7. After he gave away some pears and 15 apples, the ratio of the number of oranges to the total number of fruits left became 1:2.

(a) How many apples did Farmer Daniel have at first?
(b) How many pears did Farmer Daniel give away?

Mr. bot, I think you are wrong as usual for any non-trivial math problems

It said 1/4 of 128 are apples , so he had 32
(the bot actually got this division correct)
so there were 96 pears and oranges in the ratio of 7:5 = 7x : 5x
then 7x + 5x = 96
x = 8
and we know he had 56 pears and 40 oranges, (and 32 apples)

let the number of pears given away be y
so situation after this:
apples --- 32-15 = 17
pears --- 56 - y
oranges --- 40

oranges : ( total fruits left) = 1:2
40/(17 + 56-y + 40) = 1/2
80 = 113- y
y = 33
>b> So he gave away 33 pears

check:
before giveaway:
apples = 32
pears = 56
oranges = 40 , total is 128, ratio of oranges : pears = 40:56 = 5 : 7 , CHECK

after giveaway:
apples 17
pears = 23
oranges 40 , total left = 80 , is oranges : total = 1: 2 ? , Yes it is!!!

My answer is correct, the bot is wrong.

(a) Farmer Daniel had 32 apples at first.

(b) Farmer Daniel gave away 21 pears.