Let the 2 numbers be a and b. Let a be the larger.
i) "The difference of two numbers is 40" means: a-b=40, thus
a=b+40
ii) "their sum is 66" means : a+b=66
In i) we found that a=b+40, so substitute a=b+40 in ii):
a+b=66
(b+40)+b=66
2b+40=66
2b=26
b=13
a=b+40=13+40=53
the numbers are 53 and 13