Quick Answer Calculation

Let's say you need to calculate the answer quickly without setting too many random variables and complex calculations. If your a=x, then b=y and if a=y, then b=x; z=x+y thenĀ 

###a:r(x,y)###
###b:z-a###