1worker will complete it in(that will be 45workers×12days)
Xworkers will complete in 18days(12+6days)
we'll have
X=(1×540)/18
X = 540/18
X= 30
so if 1 worker can complete the same piece of work in 540 days, then to get the workers that will complete it in 6more day(making it 12+6=18), it will be
540/(12+6)= 30workers
note; we are looking for numbers of workers that should be removed to complete it in 6more days
so we have 45-30=15
15 workers must be removed to complete it in 18days