I’ve got to the shape raglan part and I’ve now done it five times and had to pull it back. Im not sure what I’m doing wrong but I cant seem to get my pattern to follow on correctly after I’ve done this part.

What size are you doing and can you describe the problem you’re having? I’m not experienced with doing raglans, so maybe I’m not the best person to help with this, but it will help one of us help you!

So i do my casting off as it suggests. Two rows done and left with 39 stitches and the pattern continues to follow.

Its then the first and second row instructions where it seems to go wrong and it sends the pattern im working wonky

I’m knitting a cardigan for a new born baby

This is what I’m left with when I’ve done the casting off

Welcome to KH!
It may be that you need to look at the stitches and figure out how to continue the pattern established in the main body of the sweater. Look at the K1b and decide how to start the row so that the columns of K1b will continue to align. It may be that you’ll have to work a stitch or two in plain stockinette at each end but that’s ok. The most important thing is to keep the pattern columns in line.