Let the two numbers be larger x and smaller y
The sum of two numbers is 12
x + y = 12
Their difference is 2
x - y = 2
x = 2 + y
Now substituting value of x from
x + y = 12
2 + y + y = 12
2 + 2y = 12
2y = 12 - 2
2y = 10
y = 10/2
y = 5
Substituting the value of y to derive value of x
x = 2 + y
x = 2 + 5
y = 7
The two numbers are larger 7 and smaller 5