Find a joint in your ductwork in your attic. Remove any duct tape and pull the joint apart. This will be the location for your inline fan. Inspect the ends of the ducts where you have separated the joint to make sure the edges are even. If you find uneven edges, replace that duct.
Insert the end of a ceiling box into the duct coming from your ceiling vent. A ceiling box has a round duct on one end and a box on the other. Insert the round end into your duct. Seal it with duct tape. Push the box end up to your box window fan. Tape around the box to seal it to the fan. Seal it to the back side, or the intake side, of the fan.
Tape a second ceiling box to the exhaust side of your fan. Insert the round duct of the ceiling box into your ductwork. Tape around this spot with duct tape. You now have a duct with a box in the middle of it, and a fan sitting in the middle of that box.
Plug in the window fan and check the seals for leaks. Listen closely for rushing air and tape any spots that are not properly sealed.