Let the two numbers be 'x' and 'y'
As per condition,
x+y=22 --> Eq.A
&
x-y=12 --> Eq.B
Now combining,
x+y-(x-y)=22-12
=> x+y-x+y=22-12
Here as positive and negative x, they get cancelled and the remaining :
y+y=22-12
=> 2y=10
=> y=10÷2
=> y=5
As y value is 5, now substitute in Eq. A or B. Here now I did with A:-
x+y=22
=> x+5=22
=> x=22-5
=> x=17
Therefore, value are :-
x = 17
y = 5