Open the bathroom sink cabinet, and place a bucket underneath the drain pipes. The bucket will be necessary to catch the residual water that is still in the drain line.
Use a pair of channel lock pliers to loosen the slip nut that connects the sink trap to the tailpiece. Also loosen the slip nut connecting the sink trap to the drain pipe coming from the wall. Do not remove the sink trap from the wall drain pipe. The nut is loosened so that you have some play in the sink trap to remove the tailpiece.
Loosen the slip nut that connects the tailpiece to the sink drain. Carefully remove the tailpiece from the sink drain and the sink trap. You may have to move the sink trap to the side to remove the tailpiece because the tailpiece sits inside the sink trap.
Measure the new tailpiece by placing the old one next to it. Use a hacksaw to cut the new tailpiece to the exact size of the old one. Use a piece of coarse sandpaper to remove any burrs left by cutting.
Remove any old plumber's tape from the exposed threads on the sink drain and the sink trap. Wrap the threads with a new application of plumber's tape.
Slide new slip nuts over each end of the new tailpiece. Make sure that the threads point out toward the end of the tailpiece.
Insert the new tailpiece into the sink trap. Position the sink trap and new tailpiece in line underneath the sink drain.
Thread the slip nut over the sink drain to connect the tailpiece. Thread the slip nut to the sink trap and tighten both slip nuts with the channel lock pliers.
Tighten the slip nut connecting the sink trap to the drain pipe coming from the wall.
Place the sink stopper inside the drain, and fill the sink with water. Pull the stopper out, and inspect the drain pipes as the water is draining. Pay special attention to the pipe connections, and check for leaks.