A lot of factors/details missing but technically you can do that with a big enough exhaust inline fan and filter.
Put the inline fan & filter outside the box, add a Y junction connected to the inline fan, cut an exhaust hole in the side or back of the cabinet, at the top of each chamber. Run an exhaust pipe from each hole in the chamber to each Y joint attached to the inline fan/filter. When the fan runs it will suck air out from both. As long as you can live with exhausting both chambers at the same time and both running through the filter that should work fine.