You could probably do better than cardboard, but what they heck! Go for it. Got Tape?
The compressor section (the part that sits out the window) will get hot. Some units the compressor can get up to 200 degrees.... for boarding, I would suggest using at least some thick fiberboard in lieu of carboard. some good high density foam or bubble wrap are great for insulation (pass the duct tape) and some cheap RTV and be used for seals. Get indoor bathroom/kitchen type for best results.
On the back of the AC, find the air flow (blow smoke around it to see this) and box off the exhaust area and funnel it down to the dryer hose. The compressor fan will provide decent airflow, but to increase it, one could use 6" ducting (suggest insulation around ducting... trust me, I learned the hard way lol) and a duct fan to increase the outbound airflow, thus increasing efficiency of the compressor, thus efficiency of the AC itself. I currently have my AC for my plants playing double duty. I cut a hole in the wall between my bathroom and closet, and the compressor section keeps my bathroom warm and the windows from fogging up (my bathroom gets no sunlight, and is almost always cold). I have it set at 78 degrees because I have noticed that the thermostat sucks ass on my unit, so I kinda hacked it... I am an electrical engineer... so it is spot on and the temp is measured just above the central canopy, AC compressor kicks on when the probe hits 76 degrees on the button when lights are on, 78 when lights off. I have perhaps too much airflow, lol... it sometimes causes the leaves to twist and look funky if they get too big, alas, the stocks are all nice and healthy and thick, which means good growth overall, and faster heartier growth. I also am a fan of LST and super cropping. I run a semi-SOG setup, I just let the plants get a little bushier. It yields a little less sure, but is much lower maintenance, and much cheaper. Sure you don't get as many giant buds the size of a soda can, but you still get nice dense smaller buds that are just as tasty and potent, and also dry/cure much faster with minimal disturbance.
Regardless of how you set it up, keep the following in mind when using an AC indoors for your grow:
1. AC units work on energy transfer... to make something cold, something else is getting hot. In this case, it is R-134a, which is like non-flammable, longer lasting, compressed methane liquid temp wise. Cold air out the front, hot air out the back. Thus
A. Having it in open air will a worse effect than just using fans... it will heat the area up (cooling is so inefficient compared to heating)
B. The compressor will only run for MM:SS maximum. The higher end models have a longer run/rest cylce ratio, some are continuous such as in commercial and some apartments. A cheap $100 (new) AC will be ~5k-6k btus, consume from 350w-750w (the lower the wattage the slower the unit to start cooling) when the compressor is on. Most have a fan option which consumes about 25-30W of electricity (usually via a cylindrical fan or turbo fan in higher end models. Personally I got my AC units all off craigslist and the like for $25-50. Only use 110-120V ACs if you are in the US, unless you have the ability to wire in a 220v board before the switch to 110/120V for your main house line (power is transmitted at a very high voltage, then phased by transformers, the big cylindrical objects on top the power pole. It runs into your home at 220V, which is what electric driers run at, and most commercial electric. Many electric ranges and stoves do too...). More modern houses (circa 1970s) have 220V drier and appliance leads native, which means there is only one panel. Some houses have two seperate panels. Some older ACs ran on 220V and used the same plug as a drier or commercial oven, and those can be found as well. Also, make sure you have plenty of dedicated amperage for your grow area. You want at least 10 amps for a small 400w grow with a good modern AC (installed and vented properly, air isolated, etc.) to not have to worry about magnetic ballast power surge on startup. which I have a specialty circuit breaker surge protector I made incase there is an overload the AC does not shutdown sudddenly (bad for modern ACs... weakens the evaporator seals) and I know the light can handle it.
2.The minimum volume for the rear of the AC, is 6x the area being cooled by the unit (if using a properly rated unit if applied to larger rooms). You cannot simply put a small box around the back. This will cause modern ACs to trip the overheat safety (compressor won't kick on till it reaches a certain cool temp), or on older units will cause them to burn out the motors. One can isolate and ventilate the system easily, however you need to ensure that airflow rates are at the compressor fans max airflow rate, or boosted with an inline duct fan. One can even introduce a fine distilled water mist into the air intake portion of the compressor fan/compressor area to accellerate cooling. Only do this with a good new modern unit, or one that has been inspected. These are made to handle some rain, a little fine atomized mist going in, turning into steam and being sucked out is not gonna hurt, it will help.
3. Never use direct AC air on a HPS bulb. you can suck the air via a duct/fan from the area cooled by the AC, though this will make the room heat quicker. I suggest using air from the same area the compressor fan is getting its air. This will conserve the cool air, thus cutting back on energy usage.
4. Do not set plants too close to the AC outlet. Try to keep at least 2 feet, or else you will notice some slowed growth on portions of the plant, and discoloration.
5. Remember the thermostat on most units is built into the unit itself. Some units have remotes with the thermostat in the remote. It is also easy to wire in and calibrate a new thermostat wherever you may want it. One can even build a simple controller, which takes the average of several thermal probes and uses that value (simple program actually).
6. Clean the unit regularly. Unplug, spray with a spray and dry diluted solution of bleach/water (1:100) and change filter. Wipe any dust from vent/intake area.
7. Baking soda in the intake filter will help filter out skunk smell
8. Make sure males never get anywhere in the same zip code as the AC unit, or it will be an eternal pollinator, that will put the busiest bee to shame.