First, let's call the two numbers we are looking for:
Now, we can write:
(Equation 1) n+m=59
(Equation 2) n=m+23
first substitute n since it is (m+23)
(m+23)+m=59
m+23+m=59
2m+23=59
now subtract 23 from both sides since we want it to be zero in the left side
2m+23-23=59-23
2m=36
m=36/2=18
the smaller number is 18
now we can substitute 18 in the second equation
n=18+23=41
the bigger number is 41 and the smaller number is 18