Our return duct work has some serious air leaks and is not 'pulling' air out of the far reaches of the system. The basement is unfinished and when the system runs, it is pulling air under and around the door leading to the basement versus through the HVAC system. I am planning on sealing up the ducts, but one are I am not sure how to best tackle is where the return vents head up from the joists. Sections of metal were added in the joists and then the I-beams were blocked with chunks of wood and there are some pretty significant gaps. I do not know what I can use to best seal these. Would mastic work? Caulk might work, but some of the gaps are pretty large. Any advice would be great! See photos for a few examples.

Thank you!!!!