Start with the total and subtract what was eaten.

• Cupcakes baked = 7
• Cupcakes eaten = 5
• Cupcakes left = 7 − 5 = 2

There are 2 cupcakes left.
Check: 2 + 5 = 7 ✓