Let us condense your question in the form of system of equations,
x + y = 46
x - y = 2
Now, x = 46 - y
Thus,
46-y - y = 2
46 - 2y = 2
-2y = -44
Thus, y = 22.
x + y = 46
x + 22 = 46
Thus, x = 24.
Thus, the greater number is 24 and smaller number is 22.