We have GCD = 6 = 2 * 3
1^{st} number = 12 = 2^2 *3$
2^{nd} number = 18= 2 * 3^2
LCM = 72 = 2^3 * 3^2
So the 3^{rd} number has to of the form 2^a3^b
Taking the lowest powers of 2 and 3 we get the HCF
So HCF = 2^{min(1,a)}3^{min(1,b)}= 2 * 3 which gives a >=1 and b >=1
Taking the highest powers of 2 and 3 we get the LCM
LCM= 2^{max(2,a)}3^{max(2,b)}= 2^3 * 3^2 so a=3 and b <=2
Giving a=3,b=1 that is number = 2^3*3=24 or a=3,b=3 that is number = 2^3*3^2=72
so 3^{rd} number can be 24 or 72