Stitch pattern won't fit number of stitches?

I’m knitting a pair of socks using 2 circular needles. I have 56 stitches and the stitch pattern for most of the sock repeats every 8 stitches. That means that when I get to the end of my first needle I’m partway through the pattern. Eventually the second needle is going to switch to stockinette stitch, so I’ll have 28 stitches to do my pattern on. Also the pattern includes t2f and t2b and will have me do that sometimes with the stitch at the end of needle 1 and the stitch at the beginning of needle 2. So I have 2 questions. When I’m supposed to t2f or t2b with stitches on different needles, how do I do that? And when I’m only doing this pattern across 28 stitches, what should I do?

I can post pictures of the pattern if that would be better

Don’t post the pattern here as it can be a copyright violation. A name of the pattern and a link would help.

It’s streamers socks by Kristen Hansen. I got it from a pattern book so no link

Welcome to KH!
Don’t post photos of the pattern since that can cause copyright problems. Your description is fine and knitters may ask more questions if they need more information.
You could move the 2 sts needed for the twist sts to the same needle while you’re working the T2f and T2b.

The pattern should account for the fact that you don’t have the sts at each end to continue the twist. Is it possible that the twist is worked on needle one and doesn’t need to cross needles one and two?

What is the name of the pattern, please?

There’s almost always a link you can share so we can at least see them and check for errata. That’s why we ask for a name. :

The pattern doesn’t specify anything to do different when I switch to doing it on one needle. And the pattern has the twist move back and forth across 8 stitches so it definitely will move across the needles. I may just have to improvise and do s my best.

Yes, move the stitches so you can work the twist. You may want to remember that you’ve “borrowed” stitches from the other needle when you come to the heel or to the stockinette portion.