Answer:
You gave away 15 pieces of candy.
Step-by-step explanation:
Let x represent the number of pieces you give to friends.
Your equation:
30 - x
Your neighbor's equation:
45 - 2x
Set them equal to each other.
30 - x = 45 - 2x
Evaluate.
30 - x = 45 - 2x
-15 = -x
15 = x
hope this helps :)