Pull off the rotted drywall from the studs around the bathtub using your pry bar and hammer. Extract all nails and screws from the studs.
Measure the width of one wall, starting at one end and measuring out to the middle of the last stud that's within 5 feet of the wall.
Mark out that measurement on a piece of 5x4 cementboard, cutting it along the 4-foot side with your jigsaw. Also cut out holes as necessary for plumbing fixtures or other obstructions.
Attach the cement board to the wall by shooting galvanized screws through the board where there are studs behind it, putting the screws approximately every 8 inches.
Repeat the process to measure and cut cementboard pieces for the rest of the wall, first finishing the bottom course and then working your way up with higher courses. Arrange the boards so the ends are staggered, without any four-way intersections.
Cover all the walls around the tub with cementboard. Set drywall tape over the seams. Spread thin-set mortar over the tape with your drywall knife.
Allow the mortar to set overnight. Sand lightly with a pad sander to take off any high points on the dried mortar. Caulk the joint where the bottom edge of the cementboard walls meets the tub rim. Let the caulk set for 24 hours. The wall is now ready for tile or other wall covering.