Keeping Pattern Continuity

I’m a fairly novie knitter and don’t normally tackle anything too complex but i though what the hell have a go at something a little more testing. I’m now losing my patience with the knitting I’m doing. It’s only a sleeveless summer top in a simple 4 row lacy pattern which I’ve been getting along fine with until the armhole shaping. Completely lost as too how to keep continuity of pattern. I have to cast off 5 stitches each end on the next 2 rows as usual to start the shaping and then carry on with pattern :

Row 1- P2, *yon, S1, K1, psso, P2, rep from * to end.

Row 2 - K2, *P2, K2 to end

Row 3 - P2, *K2tog, yrn,P2, rep from * to end

Row 4 - Same as row 3.

I know that i have to lose 5 stitches and then carry on where the pattern would of been at that point but i’m still getting stuck, does any one have any advice as i think i may of bitten off more than i can chew and unpicking sounds good!

You would start with the 6th st of the actual pattern row; for row 1 that would be p1 (from the original p2 at the end of the pattern repeat), then start the patt rpt - yo, skp, p2, etc. Same on row 3, the 6th st would be the 2nd p of the p2, then do the patt rpt - k2tog, yo, p2, rpt. I’m thinking you meant R 4 is the same as R2, the 6th st there would be k, then p2, k2 across.

thanks for your help, great!