we are given
total number of apples =54
Let's assume each friend receives =x
He kept a apples for himself and gave each of 6 friends an equal number of apples
so, we will get equation as

now, we can solve for x

each friend receives is 9 apples.........Answer