set up 2 systems of equations: x+y=50 and x-y=18. Solve the second one for x to get x=y+18. Then plug y+18 in for x in the first equation to get y+18+y=50. Solve that for y to get y=16. Then plug that in the second equation to get x-16=18, solve for x to get 34. So, the numbers are 34 and 16.