Total cost for the trip = $800.
Let x = original number of friends.
Therefore the equally shared cost of the trip for each friend is $800/x.
After 2 friends drop out, the cost for each friend increases to $800/(x-2).
The increase in cost for each remaining friend is $20, therefore
[tex] \frac{800}{x-2} - \frac{800}{x} =20[/tex]
Divide through by 20.
[tex] \frac{40}{x-2} - \frac{40}{x} =1\\ \\\frac{40x-40(x-2)}{x(x-2)} =1 \\ \\ \frac{80}{x(x-2)} =1[/tex]
Cross multiply.
x(x - 2) = 80
x² - 2x - 80 = 0
(x + 8)(x - 10) = 0
x = -8 or 10
Reject x = -8 because we cannot have a negative number for friends.
x = 10
Answer: There were 10 friends in the original group.