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,

According to the question,


Hence, there were 5 friends.