Firstly, 18 and 9 are divisible by 3
factors of 18 are
1 and 18, 2 and 9, 3 and 6
The only factors of 18 that give us 18 when multiply and 9 when add are 3 and 6
3 + 6 = 9
3 x 6 = 18
The two numbers are 3 and 6
Another method to use
Let the number be x and y
when will multiply
x * y = 18
when add
x + y = 9
xy =