While it is theoretically possible your ball might attack and injure or kill your guinea pig if he/she came across it, there are a lot of maybes in the equation.
IF your ball python can escape it's enclosure. IF the ball pythons escaped while hungry and went looking for food. IF the hungry, escaped ball python happened to go unnoticed for an extended period of time to allow it time to hunt down the guinea pig enclosure. IF the hungry, escaped, unnoticed ball python could then figure out how to get into the guinea pig enclosure, THEN it might be a problem.
So, to simplify your life, make the ball pythons enclosure hard to escape from. Feed the ball python regularly, get in the habit of peeking in on the ball python regularly, and finally make sure the guinea pig enclosure is as snake proof as you can, and don't worry about it too much.
Gale