A single sound wave enters each tube structure at S. At every junction it travels both ways round the loop — a short route and a long detour — and the two waves arrive together at the detector D. When the two path lengths differ by exactly one wavelength λ, their crests line up and D hears the loudest sound. Pick a configuration and watch the crests race.
At S the sound has to go around the loop. Part of it takes the short straight tube; part takes the longer curved detour. Same wave, same wavelength λ = 0.29 m, just two different distances to travel.
Crests move along both tubes at the speed of sound. Because the detour is longer, its crests lag behind the ones on the short path by the extra distance.
At D the two waves add. If the extra distance is a whole number of wavelengths, crest meets crest and D is loud. The smallest tube size l that does this is the answer for each shape.