Hello
I am guessing from your stitch count you are making the second size. If this isn’t right then let us know.
It’s tricky when there are different sets of instructions to work at the same time.
The 20 rows of the pattern need continue throughout the entire piece. You need to continue to track these on a stitch counter or on paper, however it is you have been keeping track. Keep going rows 1 to 20 even when other things are happening at the same time.
The raglan shaping is in addition so to answer your question, no row 5 does not replace row 9.
Row 5 (and all rows in the shape raglan armholes section) is an instruction of something you do to shape the beginning and end of the row, the majority of the row remains as row 9. You need to track these shaping rows separately so that you do the first four rows twice then the last four rows repeated until the stitch count is reached, 22 sts. You can write these down and tick them off as you work them or make another system of tracking them… but keep the 20 row repeat running all the time.
The first 2 rows of shaping take 2 sts off each end, when you work your pattern row after casting off these stitches you need to take ino account you have 2 sts fewer at the beginning and end of the row and work the pattern in a way that keeps your pattern aligned. For example, you worked cast offs on rows 5 and 6 so row 7 now has 2 sts fewer and you need to work the pattern from 2 sts in, omitting the first k2.
As the raglan shaping progresses the pattern rows get shorter. Keep the pattern stutches aligned either by reading your knitting or counting how many stutches fewer you have.
Row 5 of the shaping begins and ends with a decrease but the middle part of the instruction “work to last 3 sts” means to work your pattern in alignment all the way across until only 3 stitches remain. (The instruction is not to repeat the k1, sl1, k1 psso. This row decreases a total of 2. Not 20).
There is another important sentence in the shaping instruction “keeping pattern correct throughout” this means wok the 20 rows over and over and taking into account the reduced number of stutches so your pattern is aligned.
There will come a point when you can’t manage a repeat of the pattern stitches because not enough stitches remain on the needlemor a full repeat. In this case work stockinette stitches for the few stitches which fall outside of a repeat.
Hope this helps
Ah, I see salmonmac has replied too. I will still post just incase there is anything here that can help.