8 friends share 3 cookies.
There are 3 cookies and 8 people.
We need to know how much cookie 1 friend gets.
1 friend gets 3/8 of a cookie.
There are 8 friends, so 8 x 3/8 = 3. The 8 friends will finish 3 cookies if they all have 3/8 of a cookie.
Each friend gets 3/8 of a cookie.