Yeah, with a series of directions like that, it can get confusing. You just have to visualize where your yarn is & what will make it have an extra loop over your needle before the next stitch.
With the first one, p2, yo, ssk, after you’ve purled 2, your yarn is in front. If you leave it in front, do the slip, slip, when you knit those 2 together (with the yarn in front), that action will create the yarn over!
With the second, k2tog, yo, p2, after you’ve knit the 2 together, yarn is in back, so you’ll need to bring the yarn front between the needles, over the top to the back, and back between the needles again to create the yo before purling the next two together.
Hope this helps.