To make this work, you would need significant fabrication skills and likely custom parts:
1. Bodywork Modification: This is the most challenging aspect. You'd need to modify the 1979 body's rear panel to accommodate the smaller 1977 taillight housings. This involves cutting, shaping, and welding metal. This is not a beginner project and requires expertise in bodywork and metal fabrication.
2. Wiring: The wiring harness connectors will be different. You'll likely need to adapt the 1979 wiring harness to the 1977 taillights, possibly involving splicing and rewiring.
3. Finding Suitable Taillights: You'll need to source 1977 Trans Am taillights in good condition. These are becoming increasingly rare and might be expensive.
4. Fabrication of Mounting Brackets: You'll likely need to create custom brackets to securely mount the 1977 taillights to the modified bodywork.
In short: This is a very complex and advanced automotive modification project. It's not a simple bolt-on swap. Unless you have extensive experience in bodywork, welding, and electrical work, it's strongly recommended you don't attempt this. The cost and time involved likely outweigh the benefits. It's much more practical to find and install correct 1979 taillights.