Answer:
 4
Explanation:
The number each friend will get is the total number divided by the number of friends:
 (20xy -10x²)/5x = (4y -2x) = 2(2y -x)
__
For x=6 and y=4, the number each friend will get is ...
 2(2×4 -6) = 2(2) = 4
Mary will give 4 sweets to each friend.