I am working on a cable pattern. On the third row it says:
K2, p3, (sl 1 wyib, k2, p1, k2, sl 1 wyib, p3) to last 2 sts, k2

I undertand that WYIB/WYIF means with yarn in back/front. But I am not sure what to do when I sl 1 wyib, how to P3 with the yarn in the back.

After you slip 1 with yarn in back, just bring the yarn to the front between the needles as you usually would when going into a purl stitch.

Thank you - that seems simple enough!

One more question about WYIB/WYIF, when you slip this stitch with the direction of WYIB, do I slip the stitch knitwise? When the directions says WYIF, do I slip the stitch purlwise? The directiond don’t indicate either way.

When a pattern doesn’t specify, I always slip as if to purl.

Yes, slip as to purl… EXCEPT when the pattern says knitwise, OR the slipped stitch is going to be passed over another stitch and dropped off (like k1, sl1, psso). If it will be passed over and dropped, also do it knitwise.