Half the sum of two numbers is 20
(x+y)/2=20
x+y=2*20
x+y=40...............(1)
Three times their difference is 18
3(y-x)=18
3(y-x)/3=18/3
y-x=6..............(2)
Add (1) and (2)
x+y=40...............(1)
y-x=6..............(2)
---------------------
2y=46
2y/2=46/2
y=23
Put the value of y in (1)
x+y=40...............(1)
x+23=40
x=40-23
x=17