Just flip the fan around
Yes, you can use a box fan to exhaust hot air out of a room—just physically turn it so the back faces the room and the front faces out the window.
Most box fans have a little switch that reverses the airflow direction. If yours doesn’t, just rotate the whole fan 180 degrees. Same result. The blades spin the same way whether you’re pulling air in or pushing it out. The fan doesn’t care.
The only thing to watch for: make sure the fan is stable when flipped. The feet might not be on the bottom anymore. A couple of bricks or a sturdy box under it works fine.
Exhausting hot air works well because you’re creating negative pressure in the room. Cooler air from elsewhere in the house (or outside, if it’s cooler at night) gets sucked in through gaps under doors or other windows. It’s not a magical AC replacement, but it
