What is the purpose of the box between the engines of an A-10?
It is the intake/exhaust duct of the cooling system.

Basically, the front side consists of the ram air duct, which feeds air into the ECU precooler, with the (heated) exhaust air vented out through the rear. The image below shows a closeup of the duct.



Image description: Kenneth Thompson, 576th Aerospace Maintenance and Regeneration Squadron aircraft mechanic, aligns a portion of the pre-cooler ram air duct onto the top of an A-10A Thunderbolt on Davis-Monthan Air Force Base, Ariz., Jan. 23, 2013. Source: warthognews.blogspot.in

Here's another image that shows a cross-section of the system. The cooling system (without the box) could be seen above the APU.



Image from pintrest.