Remove the floor trim around the edges of the room with your hammer and pry bar. Keep the trim from breaking as you remove it and save it. The trim removal will expose a half-inch space between the edges of the floorboards and the wall.
Push on the floorboards with your hands, toward the wall along the edge of the floor that’s closest to the damaged boards. Wiggle and push the boards until they loosen from the connecting boards and are nudged into the half-inch space by the wall. Leave the boards sitting in their positions, loosened but in the same order they were in when they were connected.
Repeat for the next course of boards, pushing them toward the wall and loosening them from the connecting boards. Work your way over the floor, course by course, getting all the boards loose and leaving them in the same order as before. Continue until you reach the discolored boards.
Take out the discolored boards, unsnapping them from the connecting boards. Snap the new boards in their place.
Reassemble the floor, snapping the boards back together and working your way back toward the wall where you started.
Put the floor trim back in, using your trim nailer.