Answer
“The LCM of three numbers is 360“ The prime factors of 360 are 2³×3²×5¹. That means:
At least one of the numbers contains 2³ in its factorization list.
At least one of the numbers contains 3² in its factorization list.
At least one of the numbers contains 5 in its factorization list.
“One of the numbers is 40“ The factorization list of 40 is 2³×5, so 1) and 3) are satisfied.
“The GCD of the same numbers is 2“ This implies that all 3 numbers are even, and that at least one number only has one 2.
The candidates for the 2nd number, that has 3², are: 18, 12, 72 (3²×2³), 120, 180, or 360.
The candidates for the 3rd number depends on how many 2s the 2nd number has.
If more than one: 2, 6, 18, 10, 30, 90
If only 1, those plus 4, 8, 12, 36, 72, 20, 40, 120, 180, 360