Edwin has some apples, Dillian has some oranges. Let Edwin's apples = 2a (so each gets a after split).
[[model:questions/solutions/q5421.png]]
• Edwin end: a apples + some oranges = 12 fruits
• Dillian end ratio (apples : oranges) = 1 : 6 → a : oranges_D = 1 : 6 → oranges_D = 6a
• Let Dillian give fraction f of his oranges. Oranges given = f × o
• Dillian end oranges = (1 − f)o = 6a
• Edwin end oranges = f × o = 12 − a
• Total oranges o = (1 − f)o + f × o = 6a + (12 − a) = 12 + 5a
• Total fruits at first = 2a + (12 + 5a) = 12 + 7a
• Given answer: total = 40. 12 + 7a = 40 → 7a = 28 → a = 4
• Edwin apples start = 8, Dillian oranges start = 32
• Total at first = 8 + 32 = 40
They had 40 fruits altogether at first.
Check: Edwin end = 4 + 8 = 12. Dillian end ratio = 4 : 24 = 1 : 6. ✓