A There are peaches: 1/4x+7.
B There are peaches: 1/5x+5.
C There are peaches:1/2 (x-1/4x-7-1/5x-5).
The remaining peaches: 1/8X
Relationship: A+B+C+ surplus = a box of peaches.
1/4X+7+ 1/5X+5+ 1/2(X- 1/4X-7- 1/5X-5)+ 1/8X = X
9/20X+ 12+ 1/2(X-9/20X- 12)+ 1/8X = X
18/40X+ 1 1/40X+5/40X+ 12-6 = X
34/40X+6=X
6=X-34/40X
x = 6 \6/40
X=40