Phil as 12 grapes, so P = 12.
Phil gives an equal number of grapes (g) to each of 3 friends.
12 = 3g
Solve
4 = g
Each friend gets 4 grapes.
Note: That's assuming Phil gives all of his 12 grapes to his friends. If Phil doesn't like to share, he could give each of his friends 0 grapes.