Answer:
5 friends.
Step-by-step explanation:
Let x be the number of friends,
Since, each had 2/5 of a bag of peanuts left over,
Thus, the total numbers of bag left = 2/5 of the number of friends,
[tex]=\frac{2}{5}x[/tex]
According to the question,
[tex]\frac{2}{5}x=2[/tex]
[tex]\implies x = 5[/tex]
Hence, there were 5 friends.