Start by completely removing the damaged materials. Use a circular saw set to 1” depth to cut the subflooring back beyond the damaged areas until you reach solid structural framing. Use a pry bar to remove any protruding nails and vacuum up the demolition debris. If the remaining solid wood is wet, ventilate the area and allow it time to thoroughly dry before installing replacement materials.
Use 2x6 lumber to double or “sister” the existing floor framing and provide a solid base for the new plywood subflooring. Install the new framing level with the top of the old framing.
Use 5/8" CDX plywood to replace the original subflooring. This exterior-grade plywood is a good choice for damp or occasionally wet areas because it can withstand a moderate amount of moisture without deteriorating. Measure and cut plywood as needed to cover the damaged area. Do not fit the new plywood tightly against the old subflooring – leave a 1/8” gap to allow for natural expansion.