Basically, when it comes replacing a lavatory drain assembly, if you can access it, you can fix it.
Step 1: Remove everything from under the sink and place a bucket or a dish pan beneath the sink drain. If a pan will not fit, place a folded towel beneath the drain to absorb any water spills.
Step 2: Avoid potential mishaps by turning off the water supply to the faucet before proceeding.
Step 3: The p-trap should be connected to the sink tailpiece with a metal or plastic slip nut. Loosen the nut by hand. If it is too tight, use a pipe wrench to loosen the metal slip nut or lightly tap on one of the wings of the plastic slip nut with a small hammer and chisel to loosen it.
Step 4: The far end of the assembly should be attached to a threaded wall piece with another slip nut. Loosen this nut and pull the wall tube out from the pipe to remove the assembly. If the trap has been glued into place at the wall connection or if the threads on the old galvanized wall pipe have failed, it may be necessary to free the trap assembly by cutting through the pipe with a hacksaw. If this is the case, use a Fernco brand flexible coupling to attach the new trap assembly to the sawed pipe stub.
Step 5: Use the old trap assembly as a guide for purchasing a new duplicate assembly. Typically, bathroom sink installations consist of 1-1/4” drain pipe fittings with an 1-1/2” threaded slip nut to attached it to the wall pipe.
Step 6: Clean the existing pipe and threads with a soft cloth and mild cleaning solution. Use a butter knife or small utensil to clear away any accessible buildup within the wall pipe. Be careful not to push any of the buildup down into the pipe.
Step 7: Slide the neck of the trap assembly up onto the drain tailpiece and loosely tighten the slip nut to hold it in place.
Step 8: Insert the tail end of the assembly into the wall pipe and loosely tighten its slip nut.
Step 9: Join the trap pieces together and hand tighten the slip nuts to secure the assembly into place.
Step 10: Fill the sink with water and test for leaks. Tighten slip nuts further, if necessary.