Using a drywall saw, cut through the ceiling drywall to expose the cause of the stain; in this case, the stain is caused by condensation from the air-conditioning refrigerant line (Image 1).
Remove old insulation. Measure a new piece of polyethylene insulation and cut it to size. Secure to the refrigerant line with tape (Image 2).
With the pipe properly insulated, patch the hole in the drywall. After squaring off the hole, install a 2" x 4" cut to length into the existing ceiling. The 2" x 4" will provide a base for attaching the drywall patch (Image 1). Measure the new section of drywall and cut it to size with a utility knife. Slide it in place and secure with screws (Image 2).
If the ceiling is textured, use a scraper to scrape off the stucco finish around the seam (Image 1).
Tape off the seams with drywall tape and apply a first layer of joint compound. Allow the first layer to dry, sand smooth and apply a second layer. Repeat as needed (Image 2).
Finish the patch by matching the stucco pattern on the ceiling and painting with a matching ceiling color.