For this part, you can carry the unused yarn up the side, since it's only two rows. After you knit the first row of your second yarn, bring it under the yarn attached to the side from the previous row. It gets carried up the side until you need it again.
The 'catching' to prevent puckering is usually done as you knit across the row and are switching colors. If you have this to contend with to, I'll try to explain the best way to do that, too.