Remove the old striker and catch with a screwdriver. The striker is the part on the door and the catch is attached to the main body of the dryer.
Spray each part with some sort of lubricant such as WD-40. This will make it easier to insert the parts where they need to go.
Press the catch into the cavity in the main dryer body where the old catch was removed.
Press the striker into the cavity in the door where the old striker was removed.