Let the two numbers be x and y with x being the greater number.
Given,
x = 7 + y
Also given,
x + y = 39
Substituting the value of x from above,
7 + y + y = 39
7 + 2y = 39
2y = 39 - 7
2y = 32
y =

y = 16
x = 7 + y
x = 7 + 16
x = 23
Hence, the two numbers are 23 and 16.