Hi and welcome!
Is this the pattern?
It looks like you would cut the working yarn leaving about a 6-8inch tail, thread the tail through a tapestry needle and pick up the sts off the working needle, pulling the foot end of the leg closed. This is similar to closing the crown of a hat. The cast on edge gets joined to the body.