Q:

Split a number $n$ into two numbers $a$ and $b$ such that $a-b=m$

Is there a trick or formula to split a number $n$ into two numbers $a$ and $b$ such that the two numbers have a difference of $m$, i.e. $a-b=m$.

A:

$n=a+b$
$m=a-b$
$n+m=(a+b)+(a-b)$, so $n+m=2a$, i.e. $$a=\frac{n+m}{2}, b=\frac{n-m}{2}$$

