Equations
Suppose:
x = Number of pumpkins in the first pile
We know the second pile had two fewer pumpkins than the first pile, thus:
x - 2 = Number of pumpkins in the second pile.
We also know the last pile had twice as many pumpkins as the second pile, thus:
2(x - 2) = Number of pumpkins in the last (fourth) pile.
Finally, the third pile had one fewer pumpkin than the last pile, thus:
2(x - 2) - 1 = Number of pumpkins in the third pile.
The sum of all the pumpkins is 25, thus:
x + x - 2 + 2(x - 2) + 2(x - 2) - 1 = 25
Operating:
x + x - 2 + 2x - 4 + 2 - 44 1 = 25
Simplifying:
6x -11 = 25Siml
Adding 11:
6x = 36
Dividing by 6:
x = 6
This means 2(x - 2) = 2(6 - 2) = 2*4 = 8
The last pile had 8 pumpkins
To complete the answer:
The first pile had x=6 pumpkins
The second pile had x - 2 = 4 pumpkins
The third pile had 8 - 1 = 7 pumpkins
Total = 8 + 6 + 4 + 7 = 25 pumpkins (as required)