Let's assign variables to the information in the problem...
p=calories in pie alone
s=calories in scoop of ice cream alone
s+100=p....Eq1, calories in pie alone, given info
p+s=640....Eq2, calories, pie and scoop, given info
Let's substitute Eq1 into Eq2...
p+s=640...Eq2
(s+100)+s=640...substitute for "p", solve for "s"
2s+100=640...combine like terms
2s=540...subtract 100, both sides
∴ s=270...divide both sides by 2
Substitute "s=270" into Eq1, solve for "p"...
s+100=p.......Eq1
270+100=p......substitute for "s", solve for "p"
370=p.......simplify
∴ p=370...rewrite
Let's check our solution...
s+100=p........Eq1
270+100=370...substitute for "s,p"
370=370...true, √check
p+s=640.....Eq2
270+370=640....substitute for"s,p"
640=640....true, √check
Always check your solution and work! Our solution is correct and satisfies problem statement requirements.
So...
370 calories in pie alone,
270 calories in scoop of ice cream alone.