Measure the height and width of the area next to the stairs where you plan to build a wall.
Cut two pieces of 2-by-4 to the width of the area that you measured in Step 1.
Hang a plumb bob from the joists in the basement ceiling and adjust it until its tip is touching the outside of the basement stairway. Mark this point on the ceiling joists with a pencil.
Screw the top plate to the underside of the ceiling joists using 3-inch-long screws. Align the top plate with the marks that you made in Step 3 so that the inside edge of the top plate is immediately above the outside edge of the stairway.
Hang the plumb bob from the edge of the top plate to the floor and mark its location on the floor.
Screw the bottom plate to the floor, aligning it with the marks that you made in Step 5. Drill pilot holes through the bottom plate and into the floor using a hammer drill and a masonry bit, then secure the bottom plate to the floor with concrete screws.
Measure the distance between the bottom of the top plate and the top of the bottom plate. Cut studs to this length and install them between the top and bottom plate so that they are 16 inches apart on center. Ensure that the studs are perfectly vertical by checking them with a 4-foot level.
Repeat Steps 1 through 7 for the back of the stairway and the other side of the stairway if they are still open.
Attach drywall to the stud wall by screwing it on using 1 1/2 inch-long drywall screws placed every 12 inches along the length of the studs.
Apply spackle to the holes made by the screws and to any joints between sheets of drywall. Apply drywall tape to the joints, cover the tape with another thin coat of spackle and feather it out to make it as smooth as possible. Allow it to dry for 24 hours.
Sand the spackle smooth. Paint the wall with a coat of primer, then two coats of finish paint to match the rest of the room.