Measure the width of your doorframe and cut the top of the door jamb to size. Then measure and trim the two sides as well. Now use your nail gun to secure the top piece to the two sides. For best results, hold the nail gun square to the timber. If your timber has grooves on one side, make sure they face outwards.