Since there isn't a CX-5 thread, I'll explain here. Probably the same for CX-7/CX-9.
It is behind the glove box. Took me longer to remove the stuff in the glove box than it did to replace the cabin air filter. Just open the glove box, push in on the back of the glove box in the middle (this pulls the sides in) or you can push in both sides to get the stops clear of the glove box opening. This will allow the glove box to open fully. On the right side is a dampening hook. Carefully pull up on the hook and detach it. Unhook the pivot points at the bottom of the glove box and place it on the floor. The cabin air filter will be horizontal and right in front of you. Simply pull it toward you and remove. CAUTION: There may be a lot of trash on the top side of the filter if it hasn't ever been replaced. Installation is just the reverse. Took longer to type this than it did to replace the filter.