For a visual, say the numbers are x and y.
x = 12 + y
if the sum is 74,
x + y = 74
to solve for y,
y = 74 - x
now, plug this into the first equation and solve.
x = 12 + (74 - x)
x = 86 - a
2x = 86
x = 43.
plug the solution of x into x + y = 74 and solve
43 + y = 74
y = 31.
so, your two numbers are 43 and 31. :)