Remove the section of the stairs with the broken stringer by unscrewing the hinges from the ends of the stringers.
Disassemble the stairway by tapping on the inside face of the stringer to separate it from the ends of the treads.
Make a replica of the broken stringer by taking measurements from it and making another one from a similarly sized piece of wood. On most folding attic stairways, the treads are set into a notch in the side of the stringer. Make these notches in the new stringer by cutting their outlines with a handsaw and then knocking out the waste wood with a chisel, or by crosscutting them on a table saw.
Put a bead of glue into each of the notches on the new stringer. Place the stringer onto the ends of the stair treads. Hold the stringer on by driving two finish nails through the outside face of the stringer and into the ends of the treads.
Replace the section of stairs onto the stair assembly by screwing the hinges back onto the ends of the stringers.