find the largest number which when increased by 3 is divisible by 18,27 and 45.
I think you mean the smallest number!
The divisors 18, 27, 45 factorise as,
18 : (2,3^3)
27 : (3^3)
45 : (3^2,5)
For a numer to be divisible by 18, 27 and 45, it must be divisible by all those factors that are common to all three divisors, viz. 2, 3^3, 5.
2 and 5 only appear as the 1st power, but 3 appears to the 2nd and 3rd powers and we must use the greater power.
So, smallest divisor is 2*3^3*5 = 270.
Any multiple of 270 is divisible by all of 18, 27 and 45, e.g. 540, 810, 1080, ...
So, the smallest number, which when increased by 3 and is divisdible by 18, 27 and 45 is 270 - 3 = 267.
Answer: 267
You can also decrease 540, 810, 1080, ... by 3 to get 537, 807, 1077, ... but there is no greatest number that when you increase by 3 is divisible by 18, 27 and 45.
You could even use 9856142367, which is larger than 9856142103, the number posted above, just below your original question.