We highly recommend against building any sort of duct work around the system.
The area behind and on the sides of the air conditioner where the heat is exhausted needs to be free and clear of interference. Obstructions will cause the compressor to overheat and shut off. Check your owners manual, but a medium sized air conditioner will need at least 2 feet of ventilation around the back.
Ducting the cold air causes the fins of the air conditioner to freeze up. The fins will also freeze up if cold air is blowing toward the A/C from a fan. The cold air needs to be able to flow into the room freely.
If the wall through which the air conditioner passes is more than 11" thick, you should buy a through-the-wall A/C unit. You can use a metal sleeve specially designed to fit the window A/C, and most are under $100 from a big box hardware store.
Avoid boxing the A/C system in on either side for the best results.