To remove the old window, first separate the trim from the opening by cutting through the old caulk with an oscillating tool.
After taking out the sash, the quickest way to remove the old frame and exterior trim is by cutting through it with a reciprocating saw.
A window buck made from untreated 2-by stock provides a nailing base for the new window. Peel-and-stick flashing tape isolates the buck from the masonry sill.
Slip the full-frame replacement sash into the opening. If the sill of the buck was installed level, shimming should not be necessary. Check the head jamb for level, shim if necessary.
Check the side jambs for level and tack the adjacent corner. After taking diagonal measurements to check the window for square, nail off the rest of the flange every 6 to 8 inches.
The sides are flashed next with the peel-and-stick flashing tape overlapping slightly onto the window frame.
The sill is not flashed to provide a drainage path, but the head flashing overlaps the side flashing to complete the weather seal of the window.
Nail through the trim into the buck, but avoid going through the nailing flange, which can damage the window.
Foam backer rod fills the gap between the trim and the opening. A bead of color-matched caulking completes the seal between the window and the trim, and between the trim and the opening.
The last step is sealing the inside of the window and applying trim. Low-expanding foam fills the gap between the window and the drywall to create an air seal.
With the drywall returns on this project, the interior trim is thin 1x3 stock that cover the gap between the window jamb and the drywall.