I am posting this for my wife, Chau, because I told her I’d Google it. Please point her to a video if you have one that would help her with this problem. I’ve added links to some pictures that I hope will make this more clear.
She’s knitting a sampler of cable patterns. She has finished 4 or 5 of the samples, but can’t figure out how to bind off the edges. When we looked at her book, it shows how to cast off in general, but she has 9 purl stitches and can’t see how to generalize the instructions.
What I can tell you from memory is that she had a giant sewing needle threaded with yarn. She wove it between the first couple of stitches on the row, and then could not figure out what to do next because she had too many purl stitches.
If you want to talk with her by email to clarify, her address is "email@example.com".