Institute Attack
Travel to The Castle and get ready to defend it. The enemies will attack in waves and if you set up heavy defenses beforehand, then you don't have to do that much. Some of the synths will teleport inside the castle so be prepared to respond as well. It will help tuning in to Radio Freedom to get real-time updates about the enemy positions. If the enemies stopped appearing, fast-travel to the castle again to “reload them”. After defending the Castle, talk to Ronnie then talk to Preston to complete the quest.
Brotherhood Attack
This sidequest will trigger automatically after destroying the Prydwen in the quest With Our Powers Combined. You have to deal with waves of vertibird attacks. If your defenses are already heavy enough, you just need to sit back and relax as your turrets rip their vertibirds in the sky. Another option is to snipe the pilots with VATS to make the vertibirds crash.