Form an equation to describe the situation
x+y=10
Then use the other information they gave you and form another equation
x-y=2
You can add the two equations together, and you see that the y variables cancel out(elimination)
2x=12
Solve for one variable and then plug it back into the original equation
x=6
6+y=10
y=4