How do I join the back and the front of a keyhole?

I am making a scarf from a Patons yarn, Lacette, out of their pattern book which is called “Romance.” Begin by casting on 35 stitches and working 8 repeats of the pattern when the directions for a keyhole begin. The keyhole in this scarf is made by slipping alternate stitches from the needle to a stitch holder (18 stitches on needle, 17 on stitch holder). Then you work those 18 stitches for 2 1/2 inches in stocking stitch, slipping them onto a second stitch holder.
Then you join a new ball of yarn to the 17 stitches on the first stitch holder and proceed in stocking stitch on them for 2 1/2 inches.
So, you basically have two 2 1/2 inch “flaps” to join, one on the second stitch holder and the other “flap” on the needle. The directions read this way: (RS) (Joining row). K1 from second st holder. *K1 from needle. K1 from second st holder. Rep from * to end of row. 35 stitches. I can understand that the 18 stitches on the needle and the 17 stitches on the stitch holder need to be joined to get back to the original 35 stitches but I can’t see how to do it. Someone please help. I’m going to bed now because I can’t think about this anymore.
and the 18 now need to be joined but I cannot see how to do it.

You knit a stitch from the holder, then from the needle, then from the holder, the needle, then a stitch from the needle alternating across them.

You’re going to reverse the process you used to separate the sts. So instead of dividing the sts from one needle to a stitch holder and a second needle you’re joining sts from the stitch holder and needle onto a single needle.