Whenever two or more thing "work together" (pipes filling a tank, pipes emptying a tank, people or machines doing a job, etc.), their rates of work add.
Here you are told that one pipe can fill the tank in 24 minutes so its rate is 1/24 "tank per minute". The other pipe can fill the tank in 32 min so its rate is 1/32 "tank per minute". The two pipes together fill the tank at 1/24+ 1/32 "tank per minute".
Here, you have both tanks working for, say, t minutes then the first pipe only for (18- t) minutes to fill the tank. So that is (1/24+ 1/32)t+ (1/24)(18- t)= 1 (tank). Solve that equation for t.