Answer:
25 and 15
You can easily make a system of equations:
x + y = 40
x - y = 10
Solving for x on equation 2 gets x = 10 + y.
Plugging in this into the first equation, you get 10 + y + y = 40
Thus, 10 + 2y = 40
y = 15.
Plugging this back into either equation gets x = 25.